chickadee » soil » load-ogl-texture-from-memory

load-ogl-texture-from-memory buffer length force-channels texture-id texture-flagsprocedure

Loads an image from memory into an OpenGL texture.

  • buffer: The blob from which the image should be loaded
  • length: The length, in bytes, to read from the blob
  • 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.