orx 1.16
Portable Game Engine
|
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_AddTimeParam (orxSHADER *_pstShader, const orxSTRING _zName, orxFLOAT _fWrap, const orxSTRING _zFXName) |
orxDLLAPI orxSTATUS orxFASTCALL | orxShader_AddVectorParam (orxSHADER *_pstShader, const orxSTRING _zName, orxU32 _u32ArraySize, const orxVECTOR *_avValueList) |
orxDLLAPI orxSTATUS orxFASTCALL | orxShader_ClearCache () |
orxDLLAPI orxSTATUS orxFASTCALL | orxShader_CompileCode (orxSHADER *_pstShader, const orxSTRING *_azCodeList, orxU32 _u32Size) |
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 orxSHADER *orxFASTCALL | orxShader_Get (const orxSTRING _zName) |
orxDLLAPI orxU32 orxFASTCALL | orxShader_GetID (const orxSHADER *_pstShader) |
orxDLLAPI const orxSTRING orxFASTCALL | orxShader_GetName (const orxSHADER *_pstShader) |
orxDLLAPI orxSTATUS orxFASTCALL | orxShader_Init () |
orxDLLAPI orxBOOL orxFASTCALL | orxShader_IsEnabled (const orxSHADER *_pstShader) |
orxDLLAPI orxSTATUS orxFASTCALL | orxShader_SetFloatParam (const orxSHADER *_pstShader, const orxSTRING _zName, orxU32 _u32ArraySize, const orxFLOAT *_afValueList) |
orxDLLAPI orxSTATUS orxFASTCALL | orxShader_SetTextureParam (const orxSHADER *_pstShader, const orxSTRING _zName, orxU32 _u32ArraySize, const orxTEXTURE **_apstValueList) |
orxDLLAPI void orxFASTCALL | orxShader_Setup () |
orxDLLAPI orxSTATUS orxFASTCALL | orxShader_SetVectorParam (const orxSHADER *_pstShader, const orxSTRING _zName, orxU32 _u32ArraySize, const orxVECTOR *_avValueList) |
orxDLLAPI orxSTATUS orxFASTCALL | orxShader_Start (const orxSHADER *_pstShader, const orxSTRUCTURE *_pstOwner) |
orxDLLAPI orxSTATUS orxFASTCALL | orxShader_Stop (const orxSHADER *_pstShader) |
Shader module Allows to store shader information (code + parameters).
typedef struct __orxSHADER_t orxSHADER |
Internal shader structure
Definition at line 83 of file orxShader.h.
enum orxSHADER_EVENT |
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.
enum orxSHADER_PARAM_TYPE |
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.
|
extern |
Adds a float parameter definition to a shader (parameters need to be set before compiling the shader code)
[in] | _pstShader | Concerned Shader |
[in] | _zName | Parameter's literal name |
[in] | _u32ArraySize | Parameter's array size, 0 for simple variable |
[in] | _afValueList | Parameter's float value list |
|
extern |
Adds a texture parameter definition to a shader (parameters need to be set before compiling the shader code)
[in] | _pstShader | Concerned Shader |
[in] | _zName | Parameter's literal name |
[in] | _u32ArraySize | Parameter's array size, 0 simple variable |
[in] | _apstValueList | Parameter's texture value list |
|
extern |
Adds a time parameter definition to a shader (parameters need to be set before compiling the shader code)
[in] | _pstShader | Concerned Shader |
[in] | _zName | Parameter's literal name |
[in] | _fWrap | Time will wrap around after that amount of seconds, <= 0 to ignore |
[in] | _zFXName | FX to apply as transformation (should be of type FLOAT or VECTOR), orxNULL for none |
|
extern |
Adds a vector parameter definition to a shader (parameters need to be set before compiling the shader code)
[in] | _pstShader | Concerned Shader |
[in] | _zName | Parameter's literal name |
[in] | _u32ArraySize | Parameter's array size, 0 for simple variable |
[in] | _avValueList | Parameter's vector value list |
Clears cache (if any shader is still in active use, it'll remain in memory until not referenced anymore)
|
extern |
Sets shader code & compiles it (parameters need to be set before compiling the shader code)
[in] | _pstShader | Concerned Shader |
[in] | _azCodeList | List of shader codes to compile (parameters need to be set beforehand), will be processed in order |
[in] | _u32Size | Size of the shader code list |
Creates an empty shader
Creates a shader from config
[in] | _zConfigID | Config ID @ return orxSHADER / orxNULL |
Deletes a shader
[in] | _pstShader | Concerned Shader |
Enables/disables a shader
[in] | _pstShader | Concerned Shader |
[in] | _bEnable | Enable / disable |
|
extern |
Exits from the shader module
Gets shader (internal) ID
[in] | _pstShader | Concerned Shader |
Gets shader name
[in] | _pstShader | Concerned Shader |
Inits the shader module
Is shader enabled?
[in] | _pstShader | Concerned Shader |
|
extern |
Sets the default value for a given float parameter in a shader (parameters need to be added beforehand)
[in] | _pstShader | Concerned Shader |
[in] | _zName | Parameter's literal name |
[in] | _u32ArraySize | Parameter's array size, 0 for simple variable, has to match the size used when declaring the parameter |
[in] | _afValueList | Parameter's float value list |
|
extern |
Sets the default value for a given texture parameter in a shader (parameters need to be added beforehand)
[in] | _pstShader | Concerned Shader |
[in] | _zName | Parameter's literal name |
[in] | _u32ArraySize | Parameter's array size, 0 for simple variable, has to match the size used when declaring the parameter |
[in] | _apstValueList | Parameter's texture value list |
|
extern |
Shader module setup
|
extern |
Sets the default value for a given vector parameter in a shader (parameters need to be added beforehand)
[in] | _pstShader | Concerned Shader |
[in] | _zName | Parameter's literal name |
[in] | _u32ArraySize | Parameter's array size, 0 for simple variable, has to match the size used when declaring the parameter |
[in] | _avValueList | Parameter's vector value list |
|
extern |
Starts a shader
[in] | _pstShader | Concerned Shader |
[in] | _pstOwner | Owner structure (orxOBJECT / orxVIEWPORT) |