aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2012-04-09 18:13:40 +0200
committerAlexander Sulfrian <alexander@sulfrian.net>2013-01-13 22:40:52 +0100
commitbdb4a25b0145f6819c508315e893de115f179829 (patch)
treeb2579cc656cf57f6d3b7f835b8f97d06015457ac /src
parenta1580002f8f5c56ae353f021b75f28497a936d21 (diff)
downloadusdx-bdb4a25b0145f6819c508315e893de115f179829.tar.gz
usdx-bdb4a25b0145f6819c508315e893de115f179829.tar.xz
usdx-bdb4a25b0145f6819c508315e893de115f179829.zip
menu/application: group the opengl init steps
Diffstat (limited to 'src')
-rw-r--r--src/menu/application.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/menu/application.cpp b/src/menu/application.cpp
index cd234250..86bb9232 100644
--- a/src/menu/application.cpp
+++ b/src/menu/application.cpp
@@ -139,12 +139,9 @@ namespace usdx
24,
SDL_OPENGL);
- glEnable(GL_TEXTURE_2D);
-
- glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
-
glViewport(0, 0, get_width(), get_height());
+ glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
glClear(GL_COLOR_BUFFER_BIT);
glMatrixMode(GL_PROJECTION);
@@ -154,6 +151,8 @@ namespace usdx
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
+
+ glEnable(GL_TEXTURE_2D);
glDisable(GL_DEPTH_TEST);
}