diff options
author | pixel <pixel> | 2003-03-14 02:05:15 +0000 |
---|---|---|
committer | pixel <pixel> | 2003-03-14 02:05:15 +0000 |
commit | ff05e0d8437c50e86229a79b99c8f1ae0ffe773f (patch) | |
tree | 4b53d22ecd227fb8ba9e0c653106774f9a99a27f /lib/gltexture.cc | |
parent | c9437871835f2472e40a9051704b4e20f48ed067 (diff) |
Creating shapes
Diffstat (limited to 'lib/gltexture.cc')
-rw-r--r-- | lib/gltexture.cc | 10 |
1 files changed, 6 insertions, 4 deletions
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) { |