Surprisingly, I changed my glClearColor function to this:
And now the glClear() function is taking about as long to execute as the rendering step,
Did your actual FPS change?
Measuring GPU performance using CPU benchmarking won't give accurate results. I've chased ghosts quite a few times simply because the driver's command queue got full causing a random OpenGL command to block. You're calling glClear() right after Display.update(), so it's very possible that the driver simply blocks on the first OpenGL call(s) because it has buffered enough commands (1-3 frames ahead usually). There's actually no way to know for sure what's happening, since it's completely up to the driver.
You could try to measure the actual GPU time it takes to clear the screen using
int myQuery = glGenQueries();
Then you can get the time it took to clear the screen in nano seconds using
. Note that getting the results right after calling glEndQuery() may cause performance problems since the CPU has to wait until the result is ready. I recommend that you get the results with a whole frame's delay, meaning you'll need two sets of query objects.
1. use query object 1 when rendering frame 1
2. use query object 2 when rendering frame 2
3. get result from frame 1
4. use query object 1 when rendering frame 3
5. get result from frame 2
and so on.