CL_Texture::CL_Texture - ClanLib Game SDK

Home | All Classes | Grouped Classes | Index | Search

# CL_Texture::CL_Texture

Construct a texture object.

    	CL_Texture();

    	CL_Texture(
    		int target_gl);

    	CL_Texture(
    		int target_gl, CL_PixelBuffer& image, bool autogenerate_mipmaps = false, int border = 0, int format = 0);

    	CL_Texture(
    		int target_gl, int format, int width, int height = 1, int depth = 1, int border = 0, int level = 0);

Parameters:

target_gl
  OpenGL texture target. Can be CL_TEXTURE_1D, CL_TEXTURE_2D, CL_TEXTURE_3D or CL_TEXTURE_CUBE_MAP.
image
  Initial image to upload as level-of-detail 0.
autogenerate_mipmap
  If true, enables mipmap autogeneration before uploading image.
border
  Border width of texture.
format
  Internal texture format of texture.

See also:

CL_Texture | CL_PixelBuffer

Questions or comments, write to the ClanLib mailing list.