1
0
Fork 0
mirror of https://github.com/bjornbytes/lovr.git synced 2024-07-03 04:53:35 +00:00

Gamma correct background color correctly;

This commit is contained in:
bjorn 2018-03-10 20:59:36 -08:00
parent 58e59d9772
commit e4618add55

View file

@ -87,6 +87,7 @@ void lovrGraphicsReset() {
void lovrGraphicsClear(bool clearColor, bool clearDepth, bool clearStencil, Color color, float depth, int stencil) { void lovrGraphicsClear(bool clearColor, bool clearDepth, bool clearStencil, Color color, float depth, int stencil) {
if (clearColor) { if (clearColor) {
gammaCorrectColor(&color);
float c[4] = { color.r, color.g, color.b, color.a }; float c[4] = { color.r, color.g, color.b, color.a };
glClearBufferfv(GL_COLOR, 0, c); glClearBufferfv(GL_COLOR, 0, c);
for (int i = 1; i < state.canvasCount; i++) { for (int i = 1; i < state.canvasCount; i++) {