chickadee » soil » load-ogl-single-cubemap-from-memory

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

Loads a single image from memory and splits it into an OpenGL cubemap texture.

  • buffer: Blob to load and split into the texture
  • length: Size, in bytes, to read from the blob
  • face-order: The order of the faces in the file, any permutation of "NSWEUD" representing North, South, West, East, Up, Down
  • 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.