33 #if ( defined DC_BACKENDS_SHADERGL_X11 || defined DC_BACKENDS_SHADERGL_WIN32 )
35 #ifndef H_DC_STATICPROGRAM_GL2_1_INCLUDED
36 #define H_DC_STATICPROGRAM_GL2_1_INCLUDED
38 #include <Dynacoe/Backends/Renderer/ShaderGL_Multi.h>
39 #include <Dynacoe/Backends/Renderer/ShaderGL/StaticProgram.h>
46 class StaticProgram_GL2_1 :
public StaticProgram {
48 StaticProgram_GL2_1();
52 bool Set(
const char * vertexShader,
53 const char * fragShader,
55 const std::string & name,
56 RenderBuffer * DynacoeView_uniformID,
57 RenderBuffer * Projection_uniformID,
58 RenderBuffer * DynacoeTexturePos_uniformID,
59 RenderBuffer * DynacoeTextureInfo_uniformID,
60 RenderBuffer * DynacoeLighting_uniformID,
61 RenderBuffer * DynacoeLightingInfo_uniformID
66 void Run(uint32_t *, uint32_t, RenderBuffer *, RenderBuffer *, RenderBuffer *, GLuint, GLuint);
69 int MaxLights() {
return 128; }
70 int MaxTextures() {
return 64; }
76 void UpdateUniforms(RenderBuffer * model, RenderBuffer * material);
78 void printShaderLog(
int shaderID);
79 void printProgramLog(
int program);
87 int baseTextureActiveIndex;
94 RenderBuffer * viewUniform;
95 RenderBuffer * projectionUniform;
96 RenderBuffer * textureUniform;
97 RenderBuffer * lightingUniform;
98 RenderBuffer * textureUniformInfo;
99 RenderBuffer * lightingUniformInfo;
101 int viewUniform_location;
102 int projectionUniform_location;
103 int textureInfoUniform_location;
104 int lightingDataUniform_location;
105 int lightingInfoUniform_location;
106 int textureDataUniform_location;
108 int lightingHeightUniform_location;
109 int textureHeightUniform_location;
110 int materialUniform_location;
111 int materialDataUniform_location;
112 int modelUniform_location;
114 int fbTexture_location;
115 int baseTexture_location;
116 int hasFbTexture_location;
120 StaticProgram * CreateStaticProgram();