orx 1.16
Portable Game Engine
Loading...
Searching...
No Matches
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_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)

Detailed Description

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

Typedef Documentation

◆ orxSHADER

typedef struct __orxSHADER_t orxSHADER

Internal shader structure

Definition at line 83 of file orxShader.h.

Enumeration Type Documentation

◆ 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.

◆ 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.

Function Documentation

◆ orxShader_AddFloatParam()

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

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

◆ orxShader_AddTextureParam()

orxDLLAPI orxSTATUS orxFASTCALL orxShader_AddTextureParam ( orxSHADER * _pstShader,
const orxSTRING _zName,
orxU32 _u32ArraySize,
const orxTEXTURE ** _apstValueList )
extern

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

◆ orxShader_AddTimeParam()

orxDLLAPI orxSTATUS orxFASTCALL orxShader_AddTimeParam ( orxSHADER * _pstShader,
const orxSTRING _zName,
orxFLOAT _fWrap,
const orxSTRING _zFXName )
extern

Adds a time 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]_fWrapTime will wrap around after that amount of seconds, <= 0 to ignore
[in]_zFXNameFX to apply as transformation (should be of type FLOAT or VECTOR), orxNULL for none
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxShader_AddVectorParam()

orxDLLAPI orxSTATUS orxFASTCALL orxShader_AddVectorParam ( orxSHADER * _pstShader,
const orxSTRING _zName,
orxU32 _u32ArraySize,
const orxVECTOR * _avValueList )
extern

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

◆ orxShader_ClearCache()

orxDLLAPI orxSTATUS orxFASTCALL orxShader_ClearCache ( )
extern

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

Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxShader_CompileCode()

orxDLLAPI orxSTATUS orxFASTCALL orxShader_CompileCode ( orxSHADER * _pstShader,
const orxSTRING * _azCodeList,
orxU32 _u32Size )
extern

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

Parameters
[in]_pstShaderConcerned Shader
[in]_azCodeListList of shader codes to compile (parameters need to be set beforehand), will be processed in order
[in]_u32SizeSize of the shader code list
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxShader_Create()

orxDLLAPI orxSHADER *orxFASTCALL orxShader_Create ( )
extern

Creates an empty shader

Returns
orxSHADER / orxNULL

◆ orxShader_CreateFromConfig()

orxDLLAPI orxSHADER *orxFASTCALL orxShader_CreateFromConfig ( const orxSTRING _zConfigID)
extern

Creates a shader from config

Parameters
[in]_zConfigIDConfig ID @ return orxSHADER / orxNULL

◆ orxShader_Delete()

orxDLLAPI orxSTATUS orxFASTCALL orxShader_Delete ( orxSHADER * _pstShader)
extern

Deletes a shader

Parameters
[in]_pstShaderConcerned Shader
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxShader_Enable()

orxDLLAPI void orxFASTCALL orxShader_Enable ( orxSHADER * _pstShader,
orxBOOL _bEnable )
extern

Enables/disables a shader

Parameters
[in]_pstShaderConcerned Shader
[in]_bEnableEnable / disable

◆ orxShader_Exit()

orxDLLAPI void orxFASTCALL orxShader_Exit ( )
extern

Exits from the shader module

◆ orxShader_Get()

orxDLLAPI orxSHADER *orxFASTCALL orxShader_Get ( const orxSTRING _zName)
extern

Gets shader given its name

Parameters
[in]_zNameShader name
Returns
orxSHADER / orxNULL

◆ orxShader_GetID()

orxDLLAPI orxU32 orxFASTCALL orxShader_GetID ( const orxSHADER * _pstShader)
extern

Gets shader (internal) ID

Parameters
[in]_pstShaderConcerned Shader
Returns
ID

◆ orxShader_GetName()

orxDLLAPI const orxSTRING orxFASTCALL orxShader_GetName ( const orxSHADER * _pstShader)
extern

Gets shader name

Parameters
[in]_pstShaderConcerned Shader
Returns
orxSTRING / orxSTRING_EMPTY

◆ orxShader_Init()

orxDLLAPI orxSTATUS orxFASTCALL orxShader_Init ( )
extern

Inits the shader module

Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxShader_IsEnabled()

orxDLLAPI orxBOOL orxFASTCALL orxShader_IsEnabled ( const orxSHADER * _pstShader)
extern

Is shader enabled?

Parameters
[in]_pstShaderConcerned Shader
Returns
orxTRUE if enabled, orxFALSE otherwise

◆ orxShader_SetFloatParam()

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

Sets the default value for a given float parameter in a shader (parameters need to be added beforehand)

Parameters
[in]_pstShaderConcerned Shader
[in]_zNameParameter's literal name
[in]_u32ArraySizeParameter's array size, 0 for simple variable, has to match the size used when declaring the parameter
[in]_afValueListParameter's float value list
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxShader_SetTextureParam()

orxDLLAPI orxSTATUS orxFASTCALL orxShader_SetTextureParam ( const orxSHADER * _pstShader,
const orxSTRING _zName,
orxU32 _u32ArraySize,
const orxTEXTURE ** _apstValueList )
extern

Sets the default value for a given texture parameter in a shader (parameters need to be added beforehand)

Parameters
[in]_pstShaderConcerned Shader
[in]_zNameParameter's literal name
[in]_u32ArraySizeParameter's array size, 0 for simple variable, has to match the size used when declaring the parameter
[in]_apstValueListParameter's texture value list
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxShader_Setup()

orxDLLAPI void orxFASTCALL orxShader_Setup ( )
extern

Shader module setup

◆ orxShader_SetVectorParam()

orxDLLAPI orxSTATUS orxFASTCALL orxShader_SetVectorParam ( const orxSHADER * _pstShader,
const orxSTRING _zName,
orxU32 _u32ArraySize,
const orxVECTOR * _avValueList )
extern

Sets the default value for a given vector parameter in a shader (parameters need to be added beforehand)

Parameters
[in]_pstShaderConcerned Shader
[in]_zNameParameter's literal name
[in]_u32ArraySizeParameter's array size, 0 for simple variable, has to match the size used when declaring the parameter
[in]_avValueListParameter's vector value list
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxShader_Start()

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

Starts a shader

Parameters
[in]_pstShaderConcerned Shader
[in]_pstOwnerOwner structure (orxOBJECT / orxVIEWPORT)
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxShader_Stop()

orxDLLAPI orxSTATUS orxFASTCALL orxShader_Stop ( const orxSHADER * _pstShader)
extern

Stops a shader

Parameters
[in]_pstShaderConcerned Shader
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

Generated for orx by doxygen 1.8.11