csTexture Class Reference
A simple texture. More...
#include <csplugincommon/render3d/txtmgr.h>
Public Member Functions | |
csTexture (csTextureHandle *Parent) | |
Create a csTexture object. | |
int | get_h_mask () |
int | get_h_shift () |
int | get_height () |
csTextureHandle * | get_parent () |
int | get_size () |
Query image size (alas we can't do (h << shf_w)). | |
int | get_w_mask () |
int | get_w_shift () |
int | get_width () |
virtual | ~csTexture () |
Destroy the texture object. | |
Protected Member Functions | |
void | compute_masks () |
Compute shf_x and and_x values. | |
Protected Attributes | |
int | and_h |
int | and_w |
(1 << log2(width)) - 1 and (1 << log2(height)) - 1 | |
int | h |
csTextureHandle * | parent |
The parent csTextureHandle object. | |
int | shf_h |
int | shf_w |
log2(width) and log2(height) | |
int | w |
Width and height. |
Detailed Description
A simple texture.Every csTextureHandle contains several csTexture objects. Every csTexture is just a single image and all associated parameters - width, height, shifts and so on. For performance reasons textures are allowed to be only power-of-two sizes (both horizontal and vertical). This allows us to use simple binary shift/and instead of mul/div. It is the responsability of csTextureHandle to resize textures if they do not fulfil this requirement.
The actual csTexture class does not implement any storage for the actual texture data. Every 3D driver should derive a own class from csTexture and implement appropiate backing store (for example, most hardware drivers will store the texture as a texture handle).
Definition at line 207 of file txtmgr.h.
Constructor & Destructor Documentation
|
Create a csTexture object.
|
|
Destroy the texture object.
|
Member Function Documentation
|
Compute shf_x and and_x values.
|
|
Query image size (alas we can't do (h << shf_w)).
|
Member Data Documentation
|
(1 << log2(width)) - 1 and (1 << log2(height)) - 1
|
|
The parent csTextureHandle object.
|
|
log2(width) and log2(height)
|
|
Width and height.
|
The documentation for this class was generated from the following file:
- csplugincommon/render3d/txtmgr.h
Generated for Crystal Space by doxygen 1.4.4