Data Structures | Typedefs | Enumerations | Functions

OrxShader

Data Structures

struct  orxSHADER_EVENT_PAYLOAD
struct  orxSHADER_PARAM

Typedefs

typedef struct __orxSHADER_t orxSHADER

Enumerations

enum  orxSHADER_EVENT { orxSHADER_EVENT_SET_PARAM = 0, orxSHADER_EVENT_NUMBER, orxSHADER_EVENT_NONE = orxENUM_NONE }
enum  orxSHADER_PARAM_TYPE {
  orxSHADER_PARAM_TYPE_FLOAT = 0, orxSHADER_PARAM_TYPE_TEXTURE, orxSHADER_PARAM_TYPE_VECTOR, orxSHADER_PARAM_TYPE_NUMBER,
  orxSHADER_PARAM_TYPE_NONE = orxENUM_NONE
}

Functions

orxDLLAPI orxSTATUS orxFASTCALL orxShader_AddFloatParam (orxSHADER *_pstShader, const orxSTRING _zName, orxU32 _u32ArraySize, const orxFLOAT *_afValueList)
orxDLLAPI orxSTATUS orxFASTCALL orxShader_AddTextureParam (orxSHADER *_pstShader, const orxSTRING _zName, orxU32 _u32ArraySize, const orxTEXTURE **_apstValueList)
orxDLLAPI orxSTATUS orxFASTCALL orxShader_AddVectorParam (orxSHADER *_pstShader, const orxSTRING _zName, orxU32 _u32ArraySize, const orxVECTOR *_avValueList)
orxDLLAPI orxSTATUS orxFASTCALL orxShader_CompileCode (orxSHADER *_pstShader, const orxSTRING _zCode)
orxDLLAPI orxSHADER *orxFASTCALL orxShader_Create ()
orxDLLAPI orxSHADER *orxFASTCALL orxShader_CreateFromConfig (const orxSTRING _zConfigID)
orxDLLAPI orxSTATUS orxFASTCALL orxShader_Delete (orxSHADER *_pstShader)
orxDLLAPI void orxFASTCALL orxShader_Enable (orxSHADER *_pstShader, orxBOOL _bEnable)
orxDLLAPI void orxFASTCALL orxShader_Exit ()
orxDLLAPI const orxSTRING
orxFASTCALL 
orxShader_GetName (const orxSHADER *_pstShader)
orxDLLAPI const orxLINKLIST
*orxFASTCALL 
orxShader_GetParamList (const orxSHADER *_pstShader)
orxDLLAPI orxSTATUS orxFASTCALL orxShader_Init ()
orxDLLAPI orxBOOL orxFASTCALL orxShader_IsEnabled (const orxSHADER *_pstShader)
orxDLLAPI void orxFASTCALL orxShader_Setup ()
orxDLLAPI orxSTATUS orxFASTCALL orxShader_Start (const orxSHADER *_pstShader, const orxSTRUCTURE *_pstOwner)
orxDLLAPI orxSTATUS orxFASTCALL orxShader_Stop (const orxSHADER *_pstShader)

Detailed Description

Shader module Allows to store shader information (code + parameters).


Typedef Documentation

typedef struct __orxSHADER_t orxSHADER

Internal shader structure

Definition at line 83 of file orxShader.h.


Enumeration Type Documentation

Event enum

Enumerator:
orxSHADER_EVENT_SET_PARAM 

Event sent when setting a parameter

orxSHADER_EVENT_NUMBER 
orxSHADER_EVENT_NONE 

Definition at line 88 of file orxShader.h.

Shader parameter type

Enumerator:
orxSHADER_PARAM_TYPE_FLOAT 
orxSHADER_PARAM_TYPE_TEXTURE 
orxSHADER_PARAM_TYPE_VECTOR 
orxSHADER_PARAM_TYPE_NUMBER 
orxSHADER_PARAM_TYPE_NONE 

Definition at line 56 of file orxShader.h.


Function Documentation

orxDLLAPI orxSTATUS orxFASTCALL orxShader_AddFloatParam ( orxSHADER _pstShader,
const orxSTRING  _zName,
orxU32  _u32ArraySize,
const orxFLOAT *  _afValueList 
)

Adds a float parameter definition to a shader (parameters need to be set before compiling the shader code)

Parameters:
[in]_pstShaderConcerned Shader
[in]_zNameParameter's literal name
[in]_u32ArraySizeParameter's array size, 0 for simple variable
[in]_afValueListParameter's float value list
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxShader_AddTextureParam ( orxSHADER _pstShader,
const orxSTRING  _zName,
orxU32  _u32ArraySize,
const orxTEXTURE **  _apstValueList 
)

Adds a texture parameter definition to a shader (parameters need to be set before compiling the shader code)

Parameters:
[in]_pstShaderConcerned Shader
[in]_zNameParameter's literal name
[in]_u32ArraySizeParameter's array size, 0 simple variable
[in]_apstValueListParameter's texture value list
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxShader_AddVectorParam ( orxSHADER _pstShader,
const orxSTRING  _zName,
orxU32  _u32ArraySize,
const orxVECTOR _avValueList 
)

Adds a vector parameter definition to a shader (parameters need to be set before compiling the shader code)

Parameters:
[in]_pstShaderConcerned Shader
[in]_zNameParameter's literal name
[in]_u32ArraySizeParameter's array size, 0 for simple variable
[in]_avValueListParameter's vector value list
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxShader_CompileCode ( orxSHADER _pstShader,
const orxSTRING  _zCode 
)

Sets shader code & compiles it (parameters need to be set before compiling the shader code)

Parameters:
[in]_pstShaderConcerned Shader
[in]_zCodeShader's code to compile (parameters need to be set beforehand)
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSHADER* orxFASTCALL orxShader_Create (  )

Creates an empty shader

Returns:
orxSHADER / orxNULL
orxDLLAPI orxSHADER* orxFASTCALL orxShader_CreateFromConfig ( const orxSTRING  _zConfigID )

Creates a shader from config

Parameters:
[in]_zConfigIDConfig ID @ return orxSHADER / orxNULL
orxDLLAPI orxSTATUS orxFASTCALL orxShader_Delete ( orxSHADER _pstShader )

Deletes a shader

Parameters:
[in]_pstShaderConcerned Shader
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI void orxFASTCALL orxShader_Enable ( orxSHADER _pstShader,
orxBOOL  _bEnable 
)

Enables/disables a shader

Parameters:
[in]_pstShaderConcerned Shader
[in]_bEnableEnable / disable
orxDLLAPI void orxFASTCALL orxShader_Exit (  )

Exits from the shader module

orxDLLAPI const orxSTRING orxFASTCALL orxShader_GetName ( const orxSHADER _pstShader )

Gets shader name

Parameters:
[in]_pstShaderConcerned Shader
Returns:
orxSTRING / orxSTRING_EMPTY
orxDLLAPI const orxLINKLIST* orxFASTCALL orxShader_GetParamList ( const orxSHADER _pstShader )

Gets shader parameter list

Parameters:
[in]_pstShaderConcerned Shader
Returns:
orxLINKLIST / orxNULL
orxDLLAPI orxSTATUS orxFASTCALL orxShader_Init (  )

Inits the shader module

Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxBOOL orxFASTCALL orxShader_IsEnabled ( const orxSHADER _pstShader )

Is shader enabled?

Parameters:
[in]_pstShaderConcerned Shader
Returns:
orxTRUE if enabled, orxFALSE otherwise
orxDLLAPI void orxFASTCALL orxShader_Setup (  )

Shader module setup

orxDLLAPI orxSTATUS orxFASTCALL orxShader_Start ( const orxSHADER _pstShader,
const orxSTRUCTURE _pstOwner 
)

Starts a shader

Parameters:
[in]_pstShaderConcerned Shader
[in]_pstOwnerOwner structure (orxOBJECT / orxVIEWPORT / orxNULL)
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxShader_Stop ( const orxSHADER _pstShader )

Stops a shader

Parameters:
[in]_pstShaderConcerned Shader
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

Generated for orx by doxygen 1.5.6