Can someone tell me if calling glClear(GL_DEPTH_BUFFER_BIT) multiple times between swapping buffers is supposed to be a performance death sentence?
Some of the time (not all) when I go full screen in my tests my performance drops from a sync rate of 60fps to 15fps. This never happens in windowed mode, only in full screen mode, and only if I leave code in one of my drawing routines which calls glClear(GL_DEPTH_BUFFER_BIT) before every iteration of its drawing code.
I have this problem on both Ubuntu Linux under 12.04 and 13.04 32/64 bit (I reboot and swap out SSDs to change OS). I am using SDL 2.0 RC1. My specs are a laptop with an nvidia 8600M graphics card.
The problem does NOT happen on Windows
I don’t know if the problem is the driver, linux, SDL, or that in general calling glClear(GL_DEPTH_BUFFER_BIT) is a bad thing.
I hope it okay to call glClear(GL_DEPTH_BUFFER_BIT) multiple times because I kind of need to do it for what I am doing.