mirror of
https://github.com/love2d/love.git
synced 2026-08-19 20:19:42 +02:00
Fixed love.graphics.setShader with no arguments not properly restoring the default shader.
--HG-- branch : minor
This commit is contained in:
@@ -429,6 +429,14 @@ void Shader::attach(bool temporary)
|
|||||||
|
|
||||||
void Shader::detach()
|
void Shader::detach()
|
||||||
{
|
{
|
||||||
|
if (defaultShader)
|
||||||
|
{
|
||||||
|
if (current != defaultShader)
|
||||||
|
defaultShader->attach();
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (current != nullptr)
|
if (current != nullptr)
|
||||||
glUseProgram(0);
|
glUseProgram(0);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user