From 5ab0897653d118e9e20f7c8f1cc997ff09a96ee6 Mon Sep 17 00:00:00 2001 From: Faerbit Date: Fri, 12 Dec 2014 02:19:41 +0100 Subject: [PATCH] Removing stencil buffer from depthTextures. --- graphics.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/graphics.cc b/graphics.cc index a506a64..28dc144 100644 --- a/graphics.cc +++ b/graphics.cc @@ -32,7 +32,7 @@ void Graphics::init() { depthShader = ShaderProgramCreator("depth") .attributeLocations(vao->getAttributeLocations()).create(); - depthTexture_near = SharedTexture2D( new Texture2D(windowSize, GL_DEPTH24_STENCIL8)); + depthTexture_near = SharedTexture2D( new Texture2D(windowSize, GL_DEPTH_COMPONENT16)); depthTexture_near->setMinFilter(GL_NEAREST); depthTexture_near->setMagFilter(GL_NEAREST); depthTexture_near->setWrapS(GL_CLAMP_TO_EDGE); @@ -43,7 +43,7 @@ void Graphics::init() { framebuffer_near->setDepthTexture(depthTexture_near); framebuffer_near->validate(); - depthTexture_middle = SharedTexture2D( new Texture2D(windowSize, GL_DEPTH24_STENCIL8)); + depthTexture_middle = SharedTexture2D( new Texture2D(windowSize, GL_DEPTH_COMPONENT16)); depthTexture_middle->setMinFilter(GL_NEAREST); depthTexture_middle->setMagFilter(GL_NEAREST); depthTexture_middle->setWrapS(GL_CLAMP_TO_EDGE); @@ -54,7 +54,7 @@ void Graphics::init() { framebuffer_middle->setDepthTexture(depthTexture_middle); framebuffer_middle->validate(); - depthTexture_far = SharedTexture2D( new Texture2D(windowSize, GL_DEPTH24_STENCIL8)); + depthTexture_far = SharedTexture2D( new Texture2D(windowSize, GL_DEPTH_COMPONENT16)); depthTexture_far->setMinFilter(GL_NEAREST); depthTexture_far->setMagFilter(GL_NEAREST); depthTexture_far->setWrapS(GL_CLAMP_TO_EDGE);