]> git.tdb.fi Git - libs/gl.git/commitdiff
Unbind Lighting in Renderer destructor
authorMikko Rasa <tdb@tdb.fi>
Mon, 25 Nov 2013 18:29:32 +0000 (20:29 +0200)
committerMikko Rasa <tdb@tdb.fi>
Mon, 25 Nov 2013 18:29:32 +0000 (20:29 +0200)
This solves a problem where the same lightning would get bound later and
retain an incorrect matrix due to already being bound.  It's not really a
proper fix but works in the most common cases.

source/renderer.cpp

index 36685b4742ce699d8d7a4ab5d99254443464cc48..c56216edf0fe88950a251949ea0ace70664429c6 100644 (file)
@@ -51,6 +51,7 @@ Renderer::~Renderer()
        Texturing::unbind();
        Texture::unbind_from(0);
        Material::unbind();
+       Lighting::unbind();
        Program::unbind();
        Buffer::unbind_from(ELEMENT_ARRAY_BUFFER);
        WindingTest::unbind();