diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2012-09-03 02:17:44 +0200 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2013-01-13 22:40:53 +0100 |
commit | 46c3ea21424d95a8f90db6bec5c161e266cd67b9 (patch) | |
tree | 6331b93e2e94367231ac3d55cf12837f700051aa /src/menu | |
parent | 816030e73aad13c39bc84ca6fdb814ba7131f19f (diff) | |
download | usdx-46c3ea21424d95a8f90db6bec5c161e266cd67b9.tar.gz usdx-46c3ea21424d95a8f90db6bec5c161e266cd67b9.tar.xz usdx-46c3ea21424d95a8f90db6bec5c161e266cd67b9.zip |
menu: enable (and disable) glTexture only if needed
Diffstat (limited to 'src/menu')
-rw-r--r-- | src/menu/application.cpp | 1 | ||||
-rw-r--r-- | src/menu/background_image.cpp | 3 | ||||
-rw-r--r-- | src/menu/software_mouse_pointer.cpp | 3 |
3 files changed, 6 insertions, 1 deletions
diff --git a/src/menu/application.cpp b/src/menu/application.cpp index 493053a8..c2c304c4 100644 --- a/src/menu/application.cpp +++ b/src/menu/application.cpp @@ -154,7 +154,6 @@ namespace usdx glMatrixMode(GL_MODELVIEW); glLoadIdentity(); - glEnable(GL_TEXTURE_2D); glDisable(GL_DEPTH_TEST); } diff --git a/src/menu/background_image.cpp b/src/menu/background_image.cpp index 03836902..4f8d386f 100644 --- a/src/menu/background_image.cpp +++ b/src/menu/background_image.cpp @@ -74,6 +74,7 @@ namespace usdx this->vertices[6] = 0; this->vertices[7] = 0; + glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, texture->get_texture()); glEnableClientState(GL_VERTEX_ARRAY); @@ -89,5 +90,7 @@ namespace usdx glDisableClientState(GL_VERTEX_ARRAY); glDisableClientState(GL_TEXTURE_COORD_ARRAY); glDisableClientState(GL_COLOR_ARRAY); + + glDisable(GL_TEXTURE_2D); } }; diff --git a/src/menu/software_mouse_pointer.cpp b/src/menu/software_mouse_pointer.cpp index 721d46a2..c2104b51 100644 --- a/src/menu/software_mouse_pointer.cpp +++ b/src/menu/software_mouse_pointer.cpp @@ -102,6 +102,7 @@ namespace usdx return; } + glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, texture_normal->get_texture()); glEnableClientState(GL_VERTEX_ARRAY); @@ -122,6 +123,8 @@ namespace usdx glDisableClientState(GL_VERTEX_ARRAY); glDisableClientState(GL_TEXTURE_COORD_ARRAY); glDisableClientState(GL_COLOR_ARRAY); + + glDisable(GL_TEXTURE_2D); } void SoftwareMousePointer::on_mouse_move(int x, int y) |