From ff05e0d8437c50e86229a79b99c8f1ae0ffe773f Mon Sep 17 00:00:00 2001 From: pixel Date: Fri, 14 Mar 2003 02:05:15 +0000 Subject: Creating shapes --- lib/gltexture.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'lib/gltexture.cc') diff --git a/lib/gltexture.cc b/lib/gltexture.cc index 19fc9bf..9b8f7e3 100644 --- a/lib/gltexture.cc +++ b/lib/gltexture.cc @@ -241,12 +241,14 @@ GLuint mogltk::texture::GetHeight() { } void mogltk::texture::Unbind(void) { - glBindTexture(GL_TEXTURE_2D, 0); - glDisable(GL_TEXTURE_2D); - active = 0; + if (active) { + glBindTexture(GL_TEXTURE_2D, 0); + glDisable(GL_TEXTURE_2D); + active = 0; #ifdef DEBUG - printm(M_INFO, _("Unbinding texture.\n")); + printm(M_INFO, _("Unbinding texture.\n")); #endif + } } void mogltk::texture::Taint(void) { -- cgit v1.2.3