diff --git a/src/modules/graphics/opengl/Graphics.cpp b/src/modules/graphics/opengl/Graphics.cpp index baac0b47e..1b0fdc49d 100644 --- a/src/modules/graphics/opengl/Graphics.cpp +++ b/src/modules/graphics/opengl/Graphics.cpp @@ -841,8 +841,11 @@ namespace opengl Color *colors = new Color[count]; for (size_t i = 0; i < count; ++i) { - colors[i] = Color(c[0] * 255.f, c[1] * 255.f, c[2] * 255.f, - c[3] * 255.f * int(i%2 == 0));// avoids branching. equiv to colors[i].a *= (i%2==0) ? 1 : 0; + colors[i] = Color(GLubyte(c[0] * 255.f), + GLubyte(c[1] * 255.f), + GLubyte(c[2] * 255.f), + // avoids branching. equiv to if (i%2 == 1) colors[i].a = 0; + GLubyte(c[3] * 255.f) * GLubyte(i%2 == 0)); } // TODO: overdraw at line start and end diff --git a/src/modules/graphics/opengl/wrap_PixelEffect.cpp b/src/modules/graphics/opengl/wrap_PixelEffect.cpp index 781c2ba82..2067f549a 100644 --- a/src/modules/graphics/opengl/wrap_PixelEffect.cpp +++ b/src/modules/graphics/opengl/wrap_PixelEffect.cpp @@ -93,7 +93,7 @@ namespace opengl lua_rawgeti(L, 3 + i, k); values[i * dimension + k - 1] = (float)lua_tonumber(L, -1); } - lua_pop(L, dimension); + lua_pop(L, int(dimension)); } try