You don't need to call glFinish or anything like that. The driver will finish once you call glEndList.
If the compilation is slow and you are doing this at runtime, don't use DL at all. Use VBO.
http://www.opengl.org/wiki/VBO#Sample_Code

errno

02-05-2009, 10:37 AM

Hi,

I use display lists because the benches I've made show that the VBOs version takes more time to render (80 Hz / 60 Hz).

I plan to switch to VBOs anyway because I will use GL_draw_instanced.

I agree that the compilation time will be better with VBOs but I'll still need to limit the number of compilation with the available time. To do that I need to know when a buffer has been completely uploaded. So the question remains.

Maybe for VBOs I could map the buffer.

Dark Photon

02-09-2009, 07:42 AM

Suggest before you pursue further, you find the maximum time you can expect to spend compiling a single display list (you may already have done this). Here that was the killer for this idea a while back. For not so big batches, I found you could waste ~1.4ms of clock time compiling a single geometry-only display list. And that's on a very beefy system.

errno

02-10-2009, 02:06 AM

I already have done this. I have a compile time estimator based on the size (in bytes) of the geometry. The estimator is updated after each compilation.

The problem is that the compile time is very dependent on the machine load. The estimator estimates well the compile time most of the time but sometimes, a classic geometry takes ~x10 s.