From b405703f7ac354315813d6f0ba966e74b2f8110d Mon Sep 17 00:00:00 2001 From: Michael Schuldt Date: Mon, 26 Sep 2011 13:40:57 +0200 Subject: [PATCH] Enabled depth buffer allocation. Correcting cull mode to show all faces --- LayerManagerExamples/EGLX11MockNavigation/src/OpenGLES2App.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/LayerManagerExamples/EGLX11MockNavigation/src/OpenGLES2App.cpp b/LayerManagerExamples/EGLX11MockNavigation/src/OpenGLES2App.cpp index 201edc4..e435298 100644 --- a/LayerManagerExamples/EGLX11MockNavigation/src/OpenGLES2App.cpp +++ b/LayerManagerExamples/EGLX11MockNavigation/src/OpenGLES2App.cpp @@ -50,16 +50,14 @@ OpenGLES2App::OpenGLES2App(float fps, float animationSpeed) //glEnable(GL_BLEND); glDisable(GL_BLEND); - /* glClearDepthf(1.0f); glCullFace(GL_BACK); - glEnable(GL_CULL_FACE); + glDisable(GL_CULL_FACE); // Enable z-buffer test // We are using a projection matrix optimized for a floating point depth buffer, // so the depth test and clear value need to be inverted (1 becomes near, 0 becomes far). glEnable(GL_DEPTH_TEST); glDepthFunc(GL_LEQUAL); - */ } OpenGLES2App::~OpenGLES2App() @@ -198,7 +196,7 @@ bool OpenGLES2App::createEGLContext(int width, int height) } EGLint pi32ConfigAttribs[] = { EGL_SURFACE_TYPE, EGL_WINDOW_BIT, EGL_RENDERABLE_TYPE, - EGL_OPENGL_ES2_BIT, EGL_RED_SIZE, 8, EGL_ALPHA_SIZE, 8, EGL_NONE }; + EGL_OPENGL_ES2_BIT, EGL_RED_SIZE, 8, EGL_ALPHA_SIZE, 8, EGL_DEPTH_SIZE, 1, EGL_NONE }; int iConfigs; if (!eglChooseConfig(m_eglContextStruct.eglDisplay, pi32ConfigAttribs, &m_eglContextStruct.eglConfig, 1, &iConfigs) || (iConfigs != 1)) -- 2.7.4