Hello all,
In my app (win32, c++, opengl), calls to SwapBuffers take about 20ms. What's generally going to cause a wait like that? My algorithm is this:
Swapbuffers takes more time than Render and DoPhysics combined.
Also, I'm using nvidia's perfmon extensions, and they're informing me that the the program is CPU bound, with the gpu and the driver being idle almost 50% of the time.
I'm so confused as to how this could be? For one thing, I thought SwapBuffers didn't block until you made an opengl call.
-Thomas
In my app (win32, c++, opengl), calls to SwapBuffers take about 20ms. What's generally going to cause a wait like that? My algorithm is this:
Code:
while(1){
start_time = time();
SwapBuffers(HDC);
print time() - start_time; //20ms
start_time = time();
Render();
print time() - start_time; //6ms
start_time = time();
DoPhysics();
print time() - start_time; //2ms
}
Swapbuffers takes more time than Render and DoPhysics combined.
Also, I'm using nvidia's perfmon extensions, and they're informing me that the the program is CPU bound, with the gpu and the driver being idle almost 50% of the time.
I'm so confused as to how this could be? For one thing, I thought SwapBuffers didn't block until you made an opengl call.
-Thomas