orx  stable
Portable Game Engine
OrxTexture

Macros

#define orxTEXTURE_KZ_PIXEL   "pixel"
 
#define orxTEXTURE_KZ_RESOURCE_GROUP   "Texture"
 
#define orxTEXTURE_KZ_SCREEN_NAME   "screen"
 

Typedefs

typedef struct __orxTEXTURE_t orxTEXTURE
 

Enumerations

enum  orxTEXTURE_EVENT {
  orxTEXTURE_EVENT_CREATE = 0, orxTEXTURE_EVENT_DELETE, orxTEXTURE_EVENT_LOAD, orxTEXTURE_EVENT_NUMBER,
  orxTEXTURE_EVENT_NONE = orxENUM_NONE
}
 

Functions

orxDLLAPI orxSTATUS orxFASTCALL orxTexture_ClearCache ()
 
orxDLLAPI orxTEXTURE *orxFASTCALL orxTexture_Create ()
 
orxDLLAPI orxTEXTURE *orxFASTCALL orxTexture_CreateFromFile (const orxSTRING _zFileName, orxBOOL _bKeepInCache)
 
orxDLLAPI orxSTATUS orxFASTCALL orxTexture_Delete (orxTEXTURE *_pstTexture)
 
orxDLLAPI void orxFASTCALL orxTexture_Exit ()
 
orxDLLAPI orxBITMAP *orxFASTCALL orxTexture_GetBitmap (const orxTEXTURE *_pstTexture)
 
orxDLLAPI orxU32 orxFASTCALL orxTexture_GetLoadCounter ()
 
orxDLLAPI const orxSTRING orxFASTCALL orxTexture_GetName (const orxTEXTURE *_pstTexture)
 
orxDLLAPI orxTEXTURE *orxFASTCALL orxTexture_GetScreenTexture ()
 
orxDLLAPI orxSTATUS orxFASTCALL orxTexture_GetSize (const orxTEXTURE *_pstTexture, orxFLOAT *_pfWidth, orxFLOAT *_pfHeight)
 
orxDLLAPI orxSTATUS orxFASTCALL orxTexture_Init ()
 
orxDLLAPI orxSTATUS orxFASTCALL orxTexture_LinkBitmap (orxTEXTURE *_pstTexture, const orxBITMAP *_pstBitmap, const orxSTRING _zDataName, orxBOOL _bTransferOwnership)
 
orxDLLAPI orxSTATUS orxFASTCALL orxTexture_SetColor (orxTEXTURE *_pstTexture, const orxCOLOR *_pstColor)
 
orxDLLAPI void orxFASTCALL orxTexture_Setup ()
 
orxDLLAPI orxSTATUS orxFASTCALL orxTexture_UnlinkBitmap (orxTEXTURE *_pstTexture)
 

Detailed Description

Texture module Module that handles textures

Macro Definition Documentation

#define orxTEXTURE_KZ_PIXEL   "pixel"

Definition at line 58 of file orxTexture.h.

#define orxTEXTURE_KZ_RESOURCE_GROUP   "Texture"

Definition at line 56 of file orxTexture.h.

#define orxTEXTURE_KZ_SCREEN_NAME   "screen"

Defines

Definition at line 54 of file orxTexture.h.

Typedef Documentation

typedef struct __orxTEXTURE_t orxTEXTURE

Internal texture structure

Definition at line 77 of file orxTexture.h.

Enumeration Type Documentation

Event enum

Enumerator
orxTEXTURE_EVENT_CREATE 
orxTEXTURE_EVENT_DELETE 
orxTEXTURE_EVENT_LOAD 
orxTEXTURE_EVENT_NUMBER 
orxTEXTURE_EVENT_NONE 

Definition at line 63 of file orxTexture.h.

Function Documentation

orxDLLAPI orxSTATUS orxFASTCALL orxTexture_ClearCache ( )

Clears cache (if any texture is still in active use, it'll remain in memory until not referenced anymore)

Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxTEXTURE* orxFASTCALL orxTexture_Create ( )

Creates an empty texture

Returns
orxTEXTURE / orxNULL
orxDLLAPI orxTEXTURE* orxFASTCALL orxTexture_CreateFromFile ( const orxSTRING  _zFileName,
orxBOOL  _bKeepInCache 
)

Creates a texture from a bitmap file

Parameters
[in]_zFileNameName of the bitmap
[in]_bKeepInCacheShould be kept in cache after no more references exist?
Returns
orxTEXTURE / orxNULL
orxDLLAPI orxSTATUS orxFASTCALL orxTexture_Delete ( orxTEXTURE _pstTexture)

Deletes a texture (and its referenced bitmap)

Parameters
[in]_pstTextureConcerned texture
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI void orxFASTCALL orxTexture_Exit ( )

Exits from the texture module

orxDLLAPI orxBITMAP* orxFASTCALL orxTexture_GetBitmap ( const orxTEXTURE _pstTexture)

Gets texture bitmap

Parameters
[in]_pstTextureConcerned texture
Returns
orxBITMAP / orxNULL
orxDLLAPI orxU32 orxFASTCALL orxTexture_GetLoadCounter ( )

Gets pending load counter

Returns
Pending load counter
orxDLLAPI const orxSTRING orxFASTCALL orxTexture_GetName ( const orxTEXTURE _pstTexture)

Gets texture name

Parameters
[in]_pstTextureConcerned texture
Returns
Texture name / orxSTRING_EMPTY
orxDLLAPI orxTEXTURE* orxFASTCALL orxTexture_GetScreenTexture ( )

Gets screen texture

Returns
Screen texture / orxNULL
orxDLLAPI orxSTATUS orxFASTCALL orxTexture_GetSize ( const orxTEXTURE _pstTexture,
orxFLOAT *  _pfWidth,
orxFLOAT *  _pfHeight 
)

Gets texture size

Parameters
[in]_pstTextureConcerned texture
[out]_pfWidthTexture's width
[out]_pfHeightTexture's height
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxTexture_Init ( )

Inits the texture module

Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxTexture_LinkBitmap ( orxTEXTURE _pstTexture,
const orxBITMAP _pstBitmap,
const orxSTRING  _zDataName,
orxBOOL  _bTransferOwnership 
)

Links a bitmap

Parameters
[in]_pstTextureConcerned texture
[in]_pstBitmapBitmap to link
[in]_zDataNameName associated with the bitmap (usually filename)
[in]_bTransferOwnershipIf 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 orxSTATUS orxFASTCALL orxTexture_SetColor ( orxTEXTURE _pstTexture,
const orxCOLOR _pstColor 
)

Sets texture color

Parameters
[in]_pstTextureConcerned texture
[in]_pstColorColor to set
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI void orxFASTCALL orxTexture_Setup ( )

Setups the texture module

orxDLLAPI orxSTATUS orxFASTCALL orxTexture_UnlinkBitmap ( orxTEXTURE _pstTexture)

Unlinks (and deletes if not used anymore) a bitmap

Parameters
[in]_pstTextureConcerned texture
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

Generated for orx by doxygen 1.5.6