]> git.lizzy.rs Git - irrlicht.git/blob - source/Irrlicht/OpenGL/FixedPipelineRenderer.h
Fix line endings in the new driver
[irrlicht.git] / source / Irrlicht / OpenGL / FixedPipelineRenderer.h
1 // Copyright (C) 2014 Patryk Nadrowski
2 // This file is part of the "Irrlicht Engine".
3 // For conditions of distribution and use, see copyright notice in Irrlicht.h
4
5 #pragma once
6
7 #include "IShaderConstantSetCallBack.h"
8 #include "IMaterialRendererServices.h"
9
10 namespace irr
11 {
12 namespace video
13 {
14
15 class COpenGL3MaterialBaseCB : public IShaderConstantSetCallBack
16 {
17 public:
18         COpenGL3MaterialBaseCB();
19
20         virtual void OnSetMaterial(const SMaterial& material);
21         virtual void OnSetConstants(IMaterialRendererServices* services, s32 userData);
22
23 protected:
24         bool FirstUpdateBase;
25
26         s32 WVPMatrixID;
27         s32 WVMatrixID;
28         s32 NMatrixID;
29
30         s32 GlobalAmbientID;
31         s32 MaterialAmbientID;
32         s32 MaterialDiffuseID;
33         s32 MaterialEmissiveID;
34         s32 MaterialSpecularID;
35         s32 MaterialShininessID;
36
37         s32 FogEnableID;
38         s32 FogTypeID;
39         s32 FogColorID;
40         s32 FogStartID;
41         s32 FogEndID;
42         s32 FogDensityID;
43
44         s32 ThicknessID;
45
46         bool LightEnable;
47         SColorf GlobalAmbient;
48         SColorf MaterialAmbient;
49         SColorf MaterialDiffuse;
50         SColorf MaterialEmissive;
51         SColorf MaterialSpecular;
52         f32 MaterialShininess;
53
54         s32 FogEnable;
55         s32 FogType;
56         SColorf FogColor;
57         f32 FogStart;
58         f32 FogEnd;
59         f32 FogDensity;
60
61         f32 Thickness;
62 };
63
64 class COpenGL3MaterialSolidCB : public COpenGL3MaterialBaseCB
65 {
66 public:
67         COpenGL3MaterialSolidCB();
68
69         virtual void OnSetMaterial(const SMaterial& material);
70         virtual void OnSetConstants(IMaterialRendererServices* services, s32 userData);
71
72 protected:
73         bool FirstUpdate;
74
75         s32 TMatrix0ID;
76         s32 AlphaRefID;
77         s32 TextureUsage0ID;
78         s32 TextureUnit0ID;
79
80         f32 AlphaRef;
81         s32 TextureUsage0;
82         s32 TextureUnit0;
83 };
84
85 class COpenGL3MaterialSolid2CB : public COpenGL3MaterialBaseCB
86 {
87 public:
88         COpenGL3MaterialSolid2CB();
89
90         virtual void OnSetMaterial(const SMaterial& material);
91         virtual void OnSetConstants(IMaterialRendererServices* services, s32 userData);
92
93 protected:
94         bool FirstUpdate;
95
96         s32 TMatrix0ID;
97         s32 TMatrix1ID;
98         s32 TextureUsage0ID;
99         s32 TextureUsage1ID;
100         s32 TextureUnit0ID;
101         s32 TextureUnit1ID;
102
103         s32 TextureUsage0;
104         s32 TextureUsage1;
105         s32 TextureUnit0;
106         s32 TextureUnit1;
107 };
108
109 class COpenGL3MaterialLightmapCB : public COpenGL3MaterialBaseCB
110 {
111 public:
112         COpenGL3MaterialLightmapCB(float modulate);
113
114         virtual void OnSetMaterial(const SMaterial& material);
115         virtual void OnSetConstants(IMaterialRendererServices* services, s32 userData);
116
117 protected:
118         bool FirstUpdate;
119
120         s32 TMatrix0ID;
121         s32 TMatrix1ID;
122         s32 ModulateID;
123         s32 TextureUsage0ID;
124         s32 TextureUsage1ID;
125         s32 TextureUnit0ID;
126         s32 TextureUnit1ID;
127
128         f32 Modulate;
129         s32 TextureUsage0;
130         s32 TextureUsage1;
131         s32 TextureUnit0;
132         s32 TextureUnit1;
133 };
134
135 class COpenGL3MaterialReflectionCB : public COpenGL3MaterialBaseCB
136 {
137 public:
138         COpenGL3MaterialReflectionCB();
139
140         virtual void OnSetMaterial(const SMaterial& material);
141         virtual void OnSetConstants(IMaterialRendererServices* services, s32 userData);
142
143 protected:
144         bool FirstUpdate;
145
146         s32 TMatrix0ID;
147         s32 TextureUsage0ID;
148         s32 TextureUsage1ID;
149         s32 TextureUnit0ID;
150         s32 TextureUnit1ID;
151
152         s32 TextureUsage0;
153         s32 TextureUsage1;
154         s32 TextureUnit0;
155         s32 TextureUnit1;
156 };
157
158 class COpenGL3MaterialOneTextureBlendCB : public COpenGL3MaterialBaseCB
159 {
160 public:
161         COpenGL3MaterialOneTextureBlendCB();
162
163         virtual void OnSetMaterial(const SMaterial& material);
164         virtual void OnSetConstants(IMaterialRendererServices* services, s32 userData);
165
166 protected:
167         bool FirstUpdate;
168
169         s32 TMatrix0ID;
170         s32 BlendTypeID;
171         s32 TextureUsage0ID;
172         s32 TextureUnit0ID;
173
174         s32 BlendType;
175         s32 TextureUsage0;
176         s32 TextureUnit0;
177 };
178
179 }
180 }