summaryrefslogtreecommitdiff
path: root/mogltk/gltexture.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mogltk/gltexture.cpp')
-rw-r--r--mogltk/gltexture.cpp5
1 files changed, 5 insertions, 0 deletions
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);
+}