Texture2D.set_data

Sets the texture data.

class Texture2D
void
set_data
(
T
)
(,,
GLsizei width
,
GLsizei height
,
GLenum format
,
GLenum type
,
bool mipmaps = true
,
GLint level = 0
)

Parameters

data T

A pointer to the image data or an array of the image data.

internal_format GLint

Specifies the number of color components in the texture.

width GLsizei

Specifies the width of the texture image.

height GLsizei

Specifies the height of the texture image.

format GLenum

Specifies the format of the pixel data.

type GLenum

Specifies the data type of the pixel data.

mipmaps bool

Enables mipmap-generation.

level GLint

Specifies the level-of-detail number. Level 0 is the base image level. Level n is the n th mipmap reduction image.

See Also

OpenGL, http://www.opengl.org/sdk/docs/man4/xhtml/glTexImage2D.xml

If mipmaps is true, the gl extensions must be loaded, otherwise bad things will happen!

Meta