From 718ca1d8dda36c276bd5ca5b6f0a833f61f9e5d5 Mon Sep 17 00:00:00 2001 From: pixel Date: Sun, 17 Nov 2002 18:11:58 +0000 Subject: Daily. --- mogltk/gltexture.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'mogltk/gltexture.cpp') diff --git a/mogltk/gltexture.cpp b/mogltk/gltexture.cpp index 0549ee3..7949cb9 100644 --- a/mogltk/gltexture.cpp +++ b/mogltk/gltexture.cpp @@ -62,6 +62,7 @@ void mogltk::texture::Generate() throw (GeneralException) { void mogltk::texture::Bind(bool expand) throw (GeneralException) { if (surface) throw GeneralException("Texture is not yet generated"); + glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, tex); if (expand) { glMatrixMode(GL_TEXTURE); @@ -78,3 +79,7 @@ GLuint mogltk::texture::GetWidth() { GLuint mogltk::texture::GetHeight() { return height; } + +void mogltk::texture::Unbind(void) { + glDisable(GL_TEXTURE_2D); +} -- cgit v1.2.3