diff options
author | David Walter Seikel | 2014-01-13 19:47:58 +1000 |
---|---|---|
committer | David Walter Seikel | 2014-01-13 19:47:58 +1000 |
commit | f9158592e1478b2013afc7041d9ed041cf2d2f4a (patch) | |
tree | b16e389d7988700e21b4c9741044cefa536dcbae /libraries/irrlicht-1.8.1/source/Irrlicht/CD3D9HLSLMaterialRenderer.h | |
parent | Libraries readme updated with change markers and more of the Irrlicht changes. (diff) | |
download | SledjHamr-f9158592e1478b2013afc7041d9ed041cf2d2f4a.zip SledjHamr-f9158592e1478b2013afc7041d9ed041cf2d2f4a.tar.gz SledjHamr-f9158592e1478b2013afc7041d9ed041cf2d2f4a.tar.bz2 SledjHamr-f9158592e1478b2013afc7041d9ed041cf2d2f4a.tar.xz |
Update Irrlicht to 1.8.1. Include actual change markers this time. lol
Diffstat (limited to '')
-rw-r--r-- | libraries/irrlicht-1.8.1/source/Irrlicht/CD3D9HLSLMaterialRenderer.h | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/libraries/irrlicht-1.8.1/source/Irrlicht/CD3D9HLSLMaterialRenderer.h b/libraries/irrlicht-1.8.1/source/Irrlicht/CD3D9HLSLMaterialRenderer.h new file mode 100644 index 0000000..2e051b7 --- /dev/null +++ b/libraries/irrlicht-1.8.1/source/Irrlicht/CD3D9HLSLMaterialRenderer.h | |||
@@ -0,0 +1,85 @@ | |||
1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt | ||
2 | // This file is part of the "Irrlicht Engine". | ||
3 | // For conditions of distribution and use, see copyright notice in irrlicht.h | ||
4 | |||
5 | #ifndef __C_D3D9_HLSL_MATERIAL_RENDERER_H_INCLUDED__ | ||
6 | #define __C_D3D9_HLSL_MATERIAL_RENDERER_H_INCLUDED__ | ||
7 | |||
8 | #include "IrrCompileConfig.h" | ||
9 | #ifdef _IRR_WINDOWS_ | ||
10 | |||
11 | #ifdef _IRR_COMPILE_WITH_DIRECT3D_9_ | ||
12 | |||
13 | #include "CD3D9ShaderMaterialRenderer.h" | ||
14 | #include "IGPUProgrammingServices.h" | ||
15 | |||
16 | namespace irr | ||
17 | { | ||
18 | namespace video | ||
19 | { | ||
20 | |||
21 | class IVideoDriver; | ||
22 | class IShaderConstantSetCallBack; | ||
23 | class IMaterialRenderer; | ||
24 | |||
25 | //! Class for using vertex and pixel shaders via HLSL with D3D9 | ||
26 | class CD3D9HLSLMaterialRenderer : public CD3D9ShaderMaterialRenderer | ||
27 | { | ||
28 | public: | ||
29 | |||
30 | //! Public constructor | ||
31 | CD3D9HLSLMaterialRenderer(IDirect3DDevice9* d3ddev, video::IVideoDriver* driver, | ||
32 | s32& outMaterialTypeNr, | ||
33 | const c8* vertexShaderProgram, | ||
34 | const c8* vertexShaderEntryPointName, | ||
35 | E_VERTEX_SHADER_TYPE vsCompileTarget, | ||
36 | const c8* pixelShaderProgram, | ||
37 | const c8* pixelShaderEntryPointName, | ||
38 | E_PIXEL_SHADER_TYPE psCompileTarget, | ||
39 | IShaderConstantSetCallBack* callback, | ||
40 | IMaterialRenderer* baseMaterial, | ||
41 | s32 userData); | ||
42 | |||
43 | //! Destructor | ||
44 | ~CD3D9HLSLMaterialRenderer(); | ||
45 | |||
46 | //! sets a variable in the shader. | ||
47 | //! \param vertexShader: True if this should be set in the vertex shader, false if | ||
48 | //! in the pixel shader. | ||
49 | //! \param name: Name of the variable | ||
50 | //! \param floats: Pointer to array of floats | ||
51 | //! \param count: Amount of floats in array. | ||
52 | virtual bool setVariable(bool vertexShader, const c8* name, const f32* floats, int count); | ||
53 | |||
54 | //! Bool interface for the above. | ||
55 | virtual bool setVariable(bool vertexShader, const c8* name, const bool* bools, int count); | ||
56 | |||
57 | //! Int interface for the above. | ||
58 | virtual bool setVariable(bool vertexShader, const c8* name, const s32* ints, int count); | ||
59 | |||
60 | bool OnRender(IMaterialRendererServices* service, E_VERTEX_TYPE vtxtype); | ||
61 | |||
62 | protected: | ||
63 | |||
64 | bool createHLSLVertexShader(const char* vertexShaderProgram, | ||
65 | const char* shaderEntryPointName, | ||
66 | const char* shaderTargetName); | ||
67 | |||
68 | bool createHLSLPixelShader(const char* pixelShaderProgram, | ||
69 | const char* shaderEntryPointName, | ||
70 | const char* shaderTargetName); | ||
71 | |||
72 | void printHLSLVariables(LPD3DXCONSTANTTABLE table); | ||
73 | |||
74 | LPD3DXCONSTANTTABLE VSConstantsTable; | ||
75 | LPD3DXCONSTANTTABLE PSConstantsTable; | ||
76 | }; | ||
77 | |||
78 | |||
79 | } // end namespace video | ||
80 | } // end namespace irr | ||
81 | |||
82 | #endif | ||
83 | #endif | ||
84 | #endif | ||
85 | |||