Browse Source

Enable GL_TEXTURE_2D in the Scene class instead of Video.

legacy
Sam Hocevar sam 13 years ago
parent
commit
336d42371e
2 changed files with 4 additions and 4 deletions
  1. +1
    -0
      src/scene.cpp
  2. +3
    -4
      src/video.cpp

+ 1
- 0
src/scene.cpp View File

@@ -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


+ 3
- 4
src/video.cpp View File

@@ -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


Loading…
Cancel
Save