]> git.lizzy.rs Git - irrlicht.git/blob - source/Irrlicht/OpenGL/FixedPipelineRenderer.h
OpenGL3: Drop unused material property uniforms
[irrlicht.git] / source / Irrlicht / OpenGL / FixedPipelineRenderer.h
1 // Copyright (C) 2023 Vitaliy Lobachevskiy
2 // Copyright (C) 2014 Patryk Nadrowski
3 // This file is part of the "Irrlicht Engine".
4 // For conditions of distribution and use, see copyright notice in Irrlicht.h
5
6 #pragma once
7
8 #include "IShaderConstantSetCallBack.h"
9 #include "IMaterialRendererServices.h"
10
11 namespace irr
12 {
13 namespace video
14 {
15
16 class COpenGL3MaterialBaseCB : public IShaderConstantSetCallBack
17 {
18 public:
19         COpenGL3MaterialBaseCB();
20
21         virtual void OnSetMaterial(const SMaterial& material);
22         virtual void OnSetConstants(IMaterialRendererServices* services, s32 userData);
23
24 protected:
25         bool FirstUpdateBase;
26
27         s32 WVPMatrixID;
28         s32 WVMatrixID;
29         s32 NMatrixID;
30
31         s32 FogEnableID;
32         s32 FogTypeID;
33         s32 FogColorID;
34         s32 FogStartID;
35         s32 FogEndID;
36         s32 FogDensityID;
37
38         s32 ThicknessID;
39
40         bool LightEnable;
41         SColorf GlobalAmbient;
42         SColorf MaterialAmbient;
43         SColorf MaterialDiffuse;
44         SColorf MaterialEmissive;
45         SColorf MaterialSpecular;
46         f32 MaterialShininess;
47
48         s32 FogEnable;
49         s32 FogType;
50         SColorf FogColor;
51         f32 FogStart;
52         f32 FogEnd;
53         f32 FogDensity;
54
55         f32 Thickness;
56 };
57
58 class COpenGL3MaterialSolidCB : public COpenGL3MaterialBaseCB
59 {
60 public:
61         COpenGL3MaterialSolidCB();
62
63         virtual void OnSetMaterial(const SMaterial& material);
64         virtual void OnSetConstants(IMaterialRendererServices* services, s32 userData);
65
66 protected:
67         bool FirstUpdate;
68
69         s32 TMatrix0ID;
70         s32 AlphaRefID;
71         s32 TextureUsage0ID;
72         s32 TextureUnit0ID;
73
74         f32 AlphaRef;
75         s32 TextureUsage0;
76         s32 TextureUnit0;
77 };
78
79 class COpenGL3MaterialOneTextureBlendCB : public COpenGL3MaterialBaseCB
80 {
81 public:
82         COpenGL3MaterialOneTextureBlendCB();
83
84         virtual void OnSetMaterial(const SMaterial& material);
85         virtual void OnSetConstants(IMaterialRendererServices* services, s32 userData);
86
87 protected:
88         bool FirstUpdate;
89
90         s32 TMatrix0ID;
91         s32 BlendTypeID;
92         s32 TextureUsage0ID;
93         s32 TextureUnit0ID;
94
95         s32 BlendType;
96         s32 TextureUsage0;
97         s32 TextureUnit0;
98 };
99
100 }
101 }