| 266 | this->tintLoc = gl20::GetUniformLocation(this->prog, "tint"); |
| 267 | } |
| 268 | void setUniforms(Vec2<int> screenSize, bool flipY, Colour tint = {255, 255, 255, 255}, |
| 269 | GLint texUnit = 0, GLint palUnit = 1) |
| 270 | { |
| 271 | if (screenSize != currentScreenSize) |
| 272 | { |
| 273 | currentScreenSize = screenSize; |
| 274 | this->uniform(this->screenSizeLoc, screenSize); |
| 275 | } |
| 276 | if (texUnit != currentTexUnit) |
| 277 | { |
| 278 | currentTexUnit = texUnit; |
| 279 | this->uniform(this->texLoc, texUnit); |
| 280 | } |
| 281 | if (palUnit != currentPalUnit) |
| 282 | { |
| 283 | currentPalUnit = palUnit; |
| 284 | this->uniform(this->palLoc, palUnit); |
| 285 | } |
| 286 | if (currentFlipY != flipY) |
| 287 | { |
| 288 | currentFlipY = flipY; |
| 289 | this->uniform(this->flipYLoc, flipY); |
| 290 | } |
| 291 | if (tint != currentTint) |
| 292 | { |
| 293 | currentTint = tint; |
| 294 | this->uniform(this->tintLoc, tint); |
| 295 | } |
| 296 | } |
| 297 | }; |
| 298 | |
| 299 | const char *SolidColourProgram_vertexSource = { |