From 336d42371ec648ad9afc66f901e9349317f38bc9 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Mon, 28 Feb 2011 02:26:06 +0000 Subject: [PATCH] Enable GL_TEXTURE_2D in the Scene class instead of Video. --- src/scene.cpp | 1 + src/video.cpp | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/scene.cpp b/src/scene.cpp index e0bd457f..d6b661d8 100644 --- a/src/scene.cpp +++ b/src/scene.cpp @@ -167,6 +167,7 @@ void Scene::Render() // XXX: rename to Blit() uni_tex = stdshader->GetUniformLocation("in_Texture"); glUniform1i(uni_tex, 0); + glEnable(GL_TEXTURE_2D); glEnable(GL_DEPTH_TEST); glDepthFunc(GL_LEQUAL); # if !defined HAVE_GLES_2X diff --git a/src/video.cpp b/src/video.cpp index 5fbf6e7b..f8a9010a 100644 --- a/src/video.cpp +++ b/src/video.cpp @@ -96,13 +96,12 @@ void Video::Setup(int width, int height) /* Initialise OpenGL */ glViewport(0, 0, width, height); - glEnable(GL_TEXTURE_2D); -#if defined HAVE_GL_2X || defined HAVE_GLES_1X - glShadeModel(GL_SMOOTH); -#endif glClearColor(0.1f, 0.2f, 0.3f, 0.0f); glClearDepthf(1.0); +#if defined HAVE_GL_2X || defined HAVE_GLES_1X + glShadeModel(GL_SMOOTH); +#endif #if defined HAVE_GL_2X || defined HAVE_GLES_1X glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); #endif