diff options
author | pixel <pixel> | 2002-11-17 18:11:58 +0000 |
---|---|---|
committer | pixel <pixel> | 2002-11-17 18:11:58 +0000 |
commit | 718ca1d8dda36c276bd5ca5b6f0a833f61f9e5d5 (patch) | |
tree | a165c72b5bba9f9e375c488bc454d3f12655ea31 /mogltk | |
parent | ca6d6b9117fb3f5667b4167c22ec058cdc55d1e4 (diff) |
Daily.
Diffstat (limited to 'mogltk')
-rw-r--r-- | mogltk/glbase.cpp | 1 | ||||
-rw-r--r-- | mogltk/gltexture.cpp | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/mogltk/glbase.cpp b/mogltk/glbase.cpp index 11d15ae..5e63e86 100644 --- a/mogltk/glbase.cpp +++ b/mogltk/glbase.cpp @@ -59,7 +59,6 @@ int mogltk::glbase::setup(int w, int h, int flags) throw(GeneralException) { glMatrixMode(GL_MODELVIEW); glLoadIdentity(); - glEnable(GL_TEXTURE_2D); glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 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); +} |