mirror of
https://github.com/love2d/love.git
synced 2026-08-16 08:11:02 +02:00
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:
@@ -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]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user