- create-ogl-texture data width height force-channels texture-id texture-flagsprocedure
Creates a 2D OpenGL texture from raw image data. The raw data is not freed after being uploaded. (And it is thus safe to use a blob).
- data: Blob to upload as an OpenGL texture
- width: The width of the image in pixels
- height: The height of the image in pixels
- force-channels: Format of image channels to force, see below definitions for appropriate values
- texture-id: Use either texture-id/create-new-id or use an existing texture id to overwrite an existing texture
- texture-flags: See below for appropriate texture/*** flags to use, i.e., texture/repeats or texture/mipmaps. Flags are bitwise, and can be combined with bitwise-ior
Returns an OpenGL texture ID.