Texture module Module that handles textures
#define orxTEXTURE_KZ_LOCALE_GROUP "Texture" |
#define orxTEXTURE_KZ_PIXEL "pixel" |
#define orxTEXTURE_KZ_RESOURCE_GROUP "Texture" |
#define orxTEXTURE_KZ_SCREEN "screen" |
#define orxTEXTURE_KZ_TRANSPARENT "transparent" |
Internal texture structure
Definition at line 78 of file orxTexture.h.
Event enum
Enumerator |
---|
orxTEXTURE_EVENT_CREATE |
|
orxTEXTURE_EVENT_DELETE |
|
orxTEXTURE_EVENT_LOAD |
|
orxTEXTURE_EVENT_NUMBER |
|
orxTEXTURE_EVENT_NONE |
|
Definition at line 64 of file orxTexture.h.
Clears cache (if any texture is still in active use, it'll remain in memory until not referenced anymore)
- Returns
- orxSTATUS_SUCCESS / orxSTATUS_FAILURE
Creates an empty texture
- Returns
- orxTEXTURE / orxNULL
Deletes a texture (and its referenced bitmap)
- Parameters
-
[in] | _pstTexture | Concerned texture |
- Returns
- orxSTATUS_SUCCESS / orxSTATUS_FAILURE
Exits from the texture module
Gets texture given its name
- Parameters
-
- Returns
- orxTEXTURE / orxNULL
Gets texture bitmap
- Parameters
-
[in] | _pstTexture | Concerned texture |
- Returns
- orxBITMAP / orxNULL
orxDLLAPI orxU32 orxFASTCALL orxTexture_GetLoadCount |
( |
| ) |
|
Gets pending load count
- Returns
- Pending load count
Gets texture name
- Parameters
-
[in] | _pstTexture | Concerned texture |
- Returns
- Texture name / orxSTRING_EMPTY
Gets screen texture
- Returns
- Screen texture / orxNULL
Gets texture size
- Parameters
-
[in] | _pstTexture | Concerned texture |
[out] | _pfWidth | Texture's width |
[out] | _pfHeight | Texture's height |
- Returns
- orxSTATUS_SUCCESS / orxSTATUS_FAILURE
Inits the texture module
- Returns
- orxSTATUS_SUCCESS / orxSTATUS_FAILURE
Links a bitmap
- Parameters
-
[in] | _pstTexture | Concerned texture |
[in] | _pstBitmap | Bitmap to link |
[in] | _zDataName | Name associated with the bitmap (usually filename) |
[in] | _bTransferOwnership | If set to true, the texture will become the bitmap's owner and will have it deleted upon its own deletion |
- Returns
- orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxTEXTURE* orxFASTCALL orxTexture_Load |
( |
const orxSTRING |
_zFileName, |
|
|
orxBOOL |
_bKeepInCache |
|
) |
| |
Loads a texture from a bitmap file
- Parameters
-
[in] | _zFileName | Name of the bitmap |
[in] | _bKeepInCache | Should be kept in cache after no more references exist? |
- Returns
- orxTEXTURE / orxNULL
Setups the texture module
Unlinks (and deletes if not used anymore) a bitmap
- Parameters
-
[in] | _pstTexture | Concerned texture |
- Returns
- orxSTATUS_SUCCESS / orxSTATUS_FAILURE