tags:

views:

534

answers:

1

Does anyone know if putting too many OpenGL calls into a displaylist can cause it to fail? If so, does anyone have an estimate for how many calls might do this? Is it related to video memory?

I'm calling OpenGL from JOGL, but I don't think that's significant.

+3  A: 

According to this documentation page if you try to compile a list that is too big you're supposed to get a GL_OUT_OF_MEMORY error message.
make sure you call glGetError() before and after you create the list and process all the results until GL_NO_ERROR is returned.

There doesn't seem to be a way to estimate the number of commands a list can contain. This is probably because every command takes a different size depending on its arguments and the device specific encoding used. The lists are kept in the video memory of the card so if you're using a relatively non-archaic card this should usually really not be a problem for any reasonably sized lists. If you do find this is indeed the problem you can probably use Vertex arrays or even VBOs

shoosh