From 1fd01d88c69f7814b2d3e1b12cf0d257fffa6db7 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Mon, 25 Nov 2013 20:29:32 +0200 Subject: [PATCH] Unbind Lighting in Renderer destructor 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 | 1 + 1 file changed, 1 insertion(+) diff --git a/source/renderer.cpp b/source/renderer.cpp index 36685b47..c56216ed 100644 --- a/source/renderer.cpp +++ b/source/renderer.cpp @@ -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(); -- 2.43.0