createImageTexture

open fun createImageTexture(data: ByteBuffer, width: Int, height: Int, format: Int): Int

Creates a texture from raw data.

Return

Handle to texture.

Parameters

data

Image data, in a "direct" ByteBuffer.

width

Texture width, in pixels (not bytes).

height

Texture height, in pixels.

format

Image data format (use constant appropriate for glTexImage2D(), e.g. GL_RGBA).