Don't consider different OpenGL versions when re-creating the window after a previous window and OpenGL context has been created. love.graphics has never supported switching GL versions mid-game, so we should prevent it from ever happening.

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2016-09-11 21:40:00 -03:00
parent 4dd1b3a83f
commit 11328a23cf
3 changed files with 26 additions and 11 deletions
+2 -2
View File
@@ -87,7 +87,7 @@ int w_Shader_sendFloats(lua_State *L, int startidx, Shader *shader, const Shader
float *values = _getNumbers<float>(L, startidx, shader, components, count);
if (colors && love::graphics::isGammaCorrect())
if (colors && graphics::isGammaCorrect())
{
// alpha is always linear (when present).
int gammacomponents = std::min(components, 3);
@@ -95,7 +95,7 @@ int w_Shader_sendFloats(lua_State *L, int startidx, Shader *shader, const Shader
for (int i = 0; i < count; i++)
{
for (int j = 0; j < gammacomponents; j++)
values[i * components + j] = love::math::gammaToLinear(values[i * components + j]);
values[i * components + j] = math::gammaToLinear(values[i * components + j]);
}
}