Disabling the zbuffer


#1

Hi :slight_smile:

I’d like to save some vram, and since I don’t use the depth buffer in my app, I thought I’d disable it. So I did this:

CINDER_APP(SApp, RendererGl(RendererGl::Options().depthBufferDepth(0)))

But this throws:

ExcRendererAllocation( "Failed to find suitable WGL pixel format" )

Why does that happen?

TIA :slight_smile:
Stefan


#2

I changed this line in cinder:

for( int depthDepth = options.getDepthBufferDepth(); depthDepth >= 16; depthDepth -= 8 ) {

to:

for( int depthDepth = options.getDepthBufferDepth(); depthDepth >= 0; depthDepth -= 8 ) {

And now it works :slight_smile:

I wonder if there was a reason for the limitation in Cinder.