#include <texture_group.h>
Public Types | |
Enumerations | |
| enum | TextureAllocationPolicy { create_new_texture, search_previous_textures } |
| Texture allocation policy. More... | |
Public Member Functions | |
Construction | |
| CL_TextureGroup () | |
| Constructs a null texture group. | |
| CL_TextureGroup (CL_GraphicContext &context, const CL_Size &texture_sizes) | |
| Constructs a texture group. | |
| ~CL_TextureGroup () | |
Attributes | |
| bool | is_null () const |
| Returns false when this texture group has not been set up. | |
| int | get_subtexture_count () const |
| Returns the amount of sub-textures allocated in group. | |
| int | get_subtexture_count (unsigned int texture_index) const |
| Returns the amount of sub-textures for a specific texture index. | |
| int | get_texture_count () const |
| Returns the amount of textures used by group. | |
| TextureAllocationPolicy | get_texture_allocation_policy () const |
| Returns the texture allocation policy. | |
| CL_Size | get_texture_sizes () const |
| Returns the size of the textures used by this texture group. | |
| std::vector< CL_Texture > | get_textures () const |
| Returns the textures. | |
Operations | |
| CL_Subtexture | add (CL_GraphicContext &context, const CL_Size &size) |
| Allocate space for another sub texture. | |
| void | remove (CL_Subtexture &subtexture) |
| Deallocate space, from a previously allocated texture. | |
| void | set_texture_allocation_policy (TextureAllocationPolicy policy) |
| Set the texture allocation policy. | |
| void | insert_texture (CL_Texture &texture, const CL_Rect &texture_rect) |
| Insert an existing texture into the texture group. | |
|
|
Texture allocation policy.
|
|
|
Constructs a null texture group.
|
|
||||||||||||
|
Constructs a texture group.
|
|
|
|
|
||||||||||||
|
Allocate space for another sub texture.
|
|
|
Returns the amount of sub-textures for a specific texture index.
|
|
|
Returns the amount of sub-textures allocated in group.
|
|
|
Returns the texture allocation policy.
|
|
|
Returns the amount of textures used by group.
|
|
|
Returns the size of the textures used by this texture group.
|
|
|
Returns the textures.
|
|
||||||||||||
|
Insert an existing texture into the texture group.
|
|
|
Returns false when this texture group has not been set up.
|
|
|
Deallocate space, from a previously allocated texture. Warning - It is advised to set TextureAllocationPolicy to search_previous_textures if using this function. Also be aware of texture fragmentation. Empty textures are not removed. |
|
|
Set the texture allocation policy.
|
1.4.6