MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / setUniforms

Method setUniforms

framework/render/gl20/ogl_2_0_renderer.cpp:194–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

192 LogError("\"tint\" uniform not found in shader");
193 }
194 void setUniforms(Vec2<int> screenSize, bool flipY, Colour tint = {255, 255, 255, 255},
195 GLint texUnit = 0)
196 {
197 if (screenSize != currentScreenSize)
198 {
199 currentScreenSize = screenSize;
200 this->uniform(this->screenSizeLoc, screenSize);
201 }
202 if (texUnit != currentTexUnit)
203 {
204 currentTexUnit = texUnit;
205 this->uniform(this->texLoc, texUnit);
206 }
207 if (flipY != currentFlipY)
208 {
209 currentFlipY = flipY;
210 this->uniform(this->flipYLoc, flipY);
211 }
212 if (tint != currentTint)
213 {
214 currentTint = tint;
215 this->uniform(this->tintLoc, tint);
216 }
217 }
218};
219const char *PaletteProgram_vertexSource = {
220 "#version 110\n"

Callers 5

drawFilledRectMethod · 0.45
drawRgbMethod · 0.45
drawPaletteMethod · 0.45
drawSurfaceMethod · 0.45
drawLineMethod · 0.45

Calls 1

uniformMethod · 0.80

Tested by

no test coverage detected