mirror of
https://github.com/love2d/love.git
synced 2026-08-17 19:23:38 +02:00
Properly set shader dirty flags for love_ScreenSize when love.window.setMode is called.
This commit is contained in:
@@ -218,6 +218,10 @@ void Shader::mapActiveUniforms()
|
|||||||
|
|
||||||
bool Shader::loadVolatile()
|
bool Shader::loadVolatile()
|
||||||
{
|
{
|
||||||
|
// Recreating the shader program will invalidate uniforms that rely on these.
|
||||||
|
lastCanvas = (Canvas *) -1;
|
||||||
|
lastViewport = OpenGL::Viewport();
|
||||||
|
|
||||||
// zero out active texture list
|
// zero out active texture list
|
||||||
activeTexUnits.clear();
|
activeTexUnits.clear();
|
||||||
activeTexUnits.insert(activeTexUnits.begin(), maxTexUnits, 0);
|
activeTexUnits.insert(activeTexUnits.begin(), maxTexUnits, 0);
|
||||||
@@ -304,6 +308,7 @@ bool Shader::loadVolatile()
|
|||||||
// make sure glUseProgram gets called.
|
// make sure glUseProgram gets called.
|
||||||
current = nullptr;
|
current = nullptr;
|
||||||
attach();
|
attach();
|
||||||
|
checkSetScreenParams();
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user