orx 1.16
Portable Game Engine
Loading...
Searching...
No Matches
orxShader.h
Go to the documentation of this file.
1/* Orx - Portable Game Engine
2 *
3 * Copyright (c) 2008- Orx-Project
4 *
5 * This software is provided 'as-is', without any express or implied
6 * warranty. In no event will the authors be held liable for any damages
7 * arising from the use of this software.
8 *
9 * Permission is granted to anyone to use this software for any purpose,
10 * including commercial applications, and to alter it and redistribute it
11 * freely, subject to the following restrictions:
12 *
13 * 1. The origin of this software must not be misrepresented; you must not
14 * claim that you wrote the original software. If you use this software
15 * in a product, an acknowledgment in the product documentation would be
16 * appreciated but is not required.
17 *
18 * 2. Altered source versions must be plainly marked as such, and must not be
19 * misrepresented as being the original software.
20 *
21 * 3. This notice may not be removed or altered from any source
22 * distribution.
23 */
24
32
41
42
43#ifndef _orxSHADER_H_
44#define _orxSHADER_H_
45
46
47#include "orxInclude.h"
48#include "math/orxVector.h"
49#include "display/orxTexture.h"
50#include "object/orxStructure.h"
51#include "utils/orxLinkList.h"
52
53
67
68
71typedef struct __orxSHADER_PARAM_t
72{
74 const orxSTRING zName;
76 orxU32 u32ArraySize;
77
79
80
83typedef struct __orxSHADER_t orxSHADER;
84
85
88typedef enum __orxSHADER_EVENT_t
89{
91
93
94 orxSHADER_EVENT_NONE = orxENUM_NONE
95
97
100typedef struct __orxSHADER_EVENT_PAYLOAD_t
101{
103 const orxSTRING zShaderName;
104
105 const orxSTRING zParamName;
108
109 union
110 {
111 orxFLOAT fValue;
114 };
115
117
118
121extern orxDLLAPI void orxFASTCALL orxShader_Setup();
122
126extern orxDLLAPI orxSTATUS orxFASTCALL orxShader_Init();
127
130extern orxDLLAPI void orxFASTCALL orxShader_Exit();
131
136
141extern orxDLLAPI orxSHADER *orxFASTCALL orxShader_CreateFromConfig(const orxSTRING _zConfigID);
142
147extern orxDLLAPI orxSTATUS orxFASTCALL orxShader_Delete(orxSHADER *_pstShader);
148
153
159extern orxDLLAPI orxSTATUS orxFASTCALL orxShader_Start(const orxSHADER *_pstShader, const orxSTRUCTURE *_pstOwner);
160
165extern orxDLLAPI orxSTATUS orxFASTCALL orxShader_Stop(const orxSHADER *_pstShader);
166
167
175extern orxDLLAPI orxSTATUS orxFASTCALL orxShader_AddFloatParam(orxSHADER *_pstShader, const orxSTRING _zName, orxU32 _u32ArraySize, const orxFLOAT *_afValueList);
176
184extern orxDLLAPI orxSTATUS orxFASTCALL orxShader_AddTextureParam(orxSHADER *_pstShader, const orxSTRING _zName, orxU32 _u32ArraySize, const orxTEXTURE **_apstValueList);
185
193extern orxDLLAPI orxSTATUS orxFASTCALL orxShader_AddVectorParam(orxSHADER *_pstShader, const orxSTRING _zName, orxU32 _u32ArraySize, const orxVECTOR *_avValueList);
194
202extern orxDLLAPI orxSTATUS orxFASTCALL orxShader_AddTimeParam(orxSHADER *_pstShader, const orxSTRING _zName, orxFLOAT _fWrap, const orxSTRING _zFXName);
203
211extern orxDLLAPI orxSTATUS orxFASTCALL orxShader_SetFloatParam(const orxSHADER *_pstShader, const orxSTRING _zName, orxU32 _u32ArraySize, const orxFLOAT *_afValueList);
212
220extern orxDLLAPI orxSTATUS orxFASTCALL orxShader_SetTextureParam(const orxSHADER *_pstShader, const orxSTRING _zName, orxU32 _u32ArraySize, const orxTEXTURE **_apstValueList);
221
229extern orxDLLAPI orxSTATUS orxFASTCALL orxShader_SetVectorParam(const orxSHADER *_pstShader, const orxSTRING _zName, orxU32 _u32ArraySize, const orxVECTOR *_avValueList);
230
237extern orxDLLAPI orxSTATUS orxFASTCALL orxShader_CompileCode(orxSHADER *_pstShader, const orxSTRING *_azCodeList, orxU32 _u32Size);
238
243extern orxDLLAPI void orxFASTCALL orxShader_Enable(orxSHADER *_pstShader, orxBOOL _bEnable);
244
249extern orxDLLAPI orxBOOL orxFASTCALL orxShader_IsEnabled(const orxSHADER *_pstShader);
250
255extern orxDLLAPI orxSHADER *orxFASTCALL orxShader_Get(const orxSTRING _zName);
256
261extern orxDLLAPI const orxSTRING orxFASTCALL orxShader_GetName(const orxSHADER *_pstShader);
262
267extern orxDLLAPI orxU32 orxFASTCALL orxShader_GetID(const orxSHADER *_pstShader);
268
269#endif /* _orxSHADER_H_ */
270
#define orxDLLAPI
Definition orxDecl.h:381
orxDLLAPI orxSTATUS orxFASTCALL orxShader_SetFloatParam(const orxSHADER *_pstShader, const orxSTRING _zName, orxU32 _u32ArraySize, const orxFLOAT *_afValueList)
orxDLLAPI orxSTATUS orxFASTCALL orxShader_AddTimeParam(orxSHADER *_pstShader, const orxSTRING _zName, orxFLOAT _fWrap, const orxSTRING _zFXName)
orxDLLAPI orxSTATUS orxFASTCALL orxShader_Start(const orxSHADER *_pstShader, const orxSTRUCTURE *_pstOwner)
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_SetTextureParam(const 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 void orxFASTCALL orxShader_Exit()
orxDLLAPI orxSHADER *orxFASTCALL orxShader_Create()
orxDLLAPI orxSTATUS orxFASTCALL orxShader_Stop(const orxSHADER *_pstShader)
orxDLLAPI orxSHADER *orxFASTCALL orxShader_CreateFromConfig(const orxSTRING _zConfigID)
orxDLLAPI orxSHADER *orxFASTCALL orxShader_Get(const orxSTRING _zName)
orxDLLAPI orxSTATUS orxFASTCALL orxShader_ClearCache()
orxDLLAPI orxSTATUS orxFASTCALL orxShader_AddTextureParam(orxSHADER *_pstShader, const orxSTRING _zName, orxU32 _u32ArraySize, const orxTEXTURE **_apstValueList)
orxDLLAPI orxSTATUS orxFASTCALL orxShader_CompileCode(orxSHADER *_pstShader, const orxSTRING *_azCodeList, orxU32 _u32Size)
orxDLLAPI orxSTATUS orxFASTCALL orxShader_Delete(orxSHADER *_pstShader)
orxDLLAPI orxBOOL orxFASTCALL orxShader_IsEnabled(const orxSHADER *_pstShader)
orxSHADER_EVENT
Definition orxShader.h:89
orxSHADER_PARAM_TYPE
Definition orxShader.h:57
orxDLLAPI orxU32 orxFASTCALL orxShader_GetID(const orxSHADER *_pstShader)
orxDLLAPI void orxFASTCALL orxShader_Enable(orxSHADER *_pstShader, orxBOOL _bEnable)
orxDLLAPI orxSTATUS orxFASTCALL orxShader_AddFloatParam(orxSHADER *_pstShader, const orxSTRING _zName, orxU32 _u32ArraySize, const orxFLOAT *_afValueList)
struct __orxSHADER_t orxSHADER
Definition orxShader.h:83
orxDLLAPI const orxSTRING orxFASTCALL orxShader_GetName(const orxSHADER *_pstShader)
orxDLLAPI orxSTATUS orxFASTCALL orxShader_Init()
@ orxSHADER_EVENT_NUMBER
Definition orxShader.h:92
@ orxSHADER_EVENT_NONE
Definition orxShader.h:94
@ orxSHADER_EVENT_SET_PARAM
Definition orxShader.h:90
@ orxSHADER_PARAM_TYPE_FLOAT
Definition orxShader.h:58
@ orxSHADER_PARAM_TYPE_VECTOR
Definition orxShader.h:60
@ orxSHADER_PARAM_TYPE_NUMBER
Definition orxShader.h:62
@ orxSHADER_PARAM_TYPE_TEXTURE
Definition orxShader.h:59
@ orxSHADER_PARAM_TYPE_NONE
Definition orxShader.h:64
#define orxSTRUCTURE(STRUCTURE)
#define orxSHADER(STRUCTURE)
#define orxTEXTURE(STRUCTURE)
orxSTATUS
Definition orxType.h:270
const orxSTRING zShaderName
Definition orxShader.h:103
const orxSTRING zParamName
Definition orxShader.h:105
const orxSHADER * pstShader
Definition orxShader.h:102
orxSHADER_PARAM_TYPE eParamType
Definition orxShader.h:106
const orxTEXTURE * pstValue
Definition orxShader.h:112
orxSHADER_PARAM_TYPE eType
Definition orxShader.h:75
orxU32 u32ArraySize
Definition orxShader.h:76
orxLINKLIST_NODE stNode
Definition orxShader.h:73
const orxSTRING zName
Definition orxShader.h:74

Generated for orx by doxygen 1.8.11