1 | #ifndef __SHADERLIB_H__
|
---|
2 | #define __SHADERLIB_H__
|
---|
3 |
|
---|
4 | #include <VBox/cdefs.h>
|
---|
5 |
|
---|
6 | #ifdef __cplusplus
|
---|
7 | extern "C" {
|
---|
8 | #endif
|
---|
9 |
|
---|
10 | #ifdef IN_SHADERLIB_STATIC
|
---|
11 | # define SHADERDECL(type) DECLHIDDEN(type) RTCALL
|
---|
12 | #else
|
---|
13 | # define SHADERDECL(type) DECLEXPORT(type) RTCALL
|
---|
14 | #endif
|
---|
15 |
|
---|
16 |
|
---|
17 | SHADERDECL(int) ShaderInitLib();
|
---|
18 | SHADERDECL(int) ShaderDestroyLib();
|
---|
19 |
|
---|
20 | SHADERDECL(int) ShaderContextCreate(void **ppShaderContext);
|
---|
21 | SHADERDECL(int) ShaderContextDestroy(void *pShaderContext);
|
---|
22 |
|
---|
23 | SHADERDECL(int) ShaderCreateVertexShader(void *pShaderContext, const uint32_t *pShaderData, void **pShaderObj);
|
---|
24 | SHADERDECL(int) ShaderCreatePixelShader(void *pShaderContext, const uint32_t *pShaderData, void **pShaderObj);
|
---|
25 |
|
---|
26 | SHADERDECL(int) ShaderDestroyVertexShader(void *pShaderContext, void *pShaderObj);
|
---|
27 | SHADERDECL(int) ShaderDestroyPixelShader(void *pShaderContext, void *pShaderObj);
|
---|
28 |
|
---|
29 | SHADERDECL(int) ShaderSetVertexShader(void *pShaderContext, void *pShaderObj);
|
---|
30 | SHADERDECL(int) ShaderSetPixelShader(void *pShaderContext, void *pShaderObj);
|
---|
31 |
|
---|
32 | SHADERDECL(int) ShaderSetVertexShaderConstantB(void *pShaderContext, uint32_t reg, const uint8_t *pValues, uint32_t cRegisters);
|
---|
33 | SHADERDECL(int) ShaderSetVertexShaderConstantI(void *pShaderContext, uint32_t reg, const int32_t *pValues, uint32_t cRegisters);
|
---|
34 | SHADERDECL(int) ShaderSetVertexShaderConstantF(void *pShaderContext, uint32_t reg, const float *pValues, uint32_t cRegisters);
|
---|
35 |
|
---|
36 | SHADERDECL(int) ShaderSetPixelShaderConstantB(void *pShaderContext, uint32_t reg, const uint8_t *pValues, uint32_t cRegisters);
|
---|
37 | SHADERDECL(int) ShaderSetPixelShaderConstantI(void *pShaderContext, uint32_t reg, const int32_t *pValues, uint32_t cRegisters);
|
---|
38 | SHADERDECL(int) ShaderSetPixelShaderConstantF(void *pShaderContext, uint32_t reg, const float *pValues, uint32_t cRegisters);
|
---|
39 |
|
---|
40 | SHADERDECL(int) ShaderUpdateState(void *pShaderContext, uint32_t rtHeight);
|
---|
41 |
|
---|
42 | SHADERDECL(int) ShaderTransformProjection(unsigned cxViewPort, unsigned cyViewPort, float matrix[16]);
|
---|
43 |
|
---|
44 | #ifdef __cplusplus
|
---|
45 | }
|
---|
46 | #endif
|
---|
47 |
|
---|
48 | #endif /* __SHADERLIB_H__ */
|
---|