CL_Texture3
Texture loading class for opengl.
Overview
This class can load the image(s) from surface provider into OpenGL textures.
This class works just like a surface, except that it requires the image width to be 2^n.
Class members
- static CL_Texture *
create( -
CL_SurfaceProvider *provider, bool delete_provider=false)
- static CL_Texture *
load( -
const char *id, CL_ResourceManager *manager)
- virtual
~CL_Texture()
- virtual void
bind( -
int texture_no=0)
- virtual CL_SurfaceProvider *
get_provider()
- virtual void
reload()
- virtual int
get_width()
- virtual int
get_height()
- virtual int
get_no_textures()
- virtual void
flush( -
CL_DisplayCard *card = NULL)
Members with descriptions
- static CL_Texture *
create( -
CL_SurfaceProvider *provider, bool delete_provider=false)
Parameters: provider - Surface provider to use as image source. delete_provider - If true, surface provider will be deleted when the texture is deleted.
Description:
Creates a texture from a surface provider.
- static CL_Texture *
load( -
const char *id, CL_ResourceManager *manager)
Parameters: id - Resource ID of the surface resource. manager - Resource manager used to load the resource from.
Description:
Load the texture from a surface resource.
- virtual
~CL_Texture() -
Description:
- virtual void
bind( -
int texture_no=0)
Parameters: texture_no - Subframe in the provider to bind.
Description:
Bind the texture in OpenGL.
- virtual CL_SurfaceProvider *
get_provider() -
Description:
Returns the surface provider.
- virtual void
reload() -
Description:
Forces surface to reload texture data from provider.
- virtual int
get_width() -
Description:
Returns the width of the surface
Return value:
Width of the texture.
- virtual int
get_height() -
Description:
Returns the height of the texture
Return value:
Height of the texture.
- virtual int
get_no_textures() -
Description:
Returns the number of subtextures in the texture
Return value:
Number of subtextures in texture.
- virtual void
flush( -
CL_DisplayCard *card = NULL)
Description:
completely flushes textures (removes from video/system-memory)