Module: Demos Branch: master Commit: 0cf0013b06c056da657683dc133c407fb24754f1 URL: http://cgit.freedesktop.org/mesa/demos/commit/?id=0cf0013b06c056da657683dc133c407fb24754f1
Author: Brian Paul <[email protected]> Date: Mon Feb 4 09:31:02 2013 -0700 cuberender: fix mis-rendering of first frame Initialize NeedNewCubeMap to TRUE so that the cubemap is generated for the first frame. Also move glClearColor call into the Init() function. --- src/demos/cuberender.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/demos/cuberender.c b/src/demos/cuberender.c index 2b6183d..19fbd7d 100644 --- a/src/demos/cuberender.c +++ b/src/demos/cuberender.c @@ -37,7 +37,7 @@ static GLfloat LightPos[4]; static GLboolean Anim = GL_TRUE; -static GLboolean NeedNewCubeMap = GL_FALSE; +static GLboolean NeedNewCubeMap = GL_TRUE; static GLuint CubeTexture; @@ -345,7 +345,6 @@ RenderCubeMap(void) GL_STENCIL_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, depthStencilRb); - glClearColor(0.25, 0.25, 0.25, 1.0); glViewport(0, 0, cubeSize, cubeSize); /* @@ -542,6 +541,8 @@ Init(void) } } + glClearColor(0.25, 0.25, 0.25, 1.0); + glEnable(GL_DEPTH_TEST); glEnable(GL_LIGHTING); glEnable(GL_LIGHT0); _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
