PDA

View Full Version : Dynamically allocated display lists



joao flavio
09-16-2012, 12:18 PM
I need to generate dynamically allocated display lists, I mean, in an application
where the users are to assemble a structure from basic components, that can have different dimensions, it is not possible to know how many components will be used.

How can I use glGenLists(n), where n varies? Or can I just use glGenList(1) every time a component is created?
Will that work? Is this question clear enough?

Thanks in advance!

Dark Photon
09-16-2012, 06:37 PM
How can I use glGenLists(n), where n varies? Or can I just use glGenList(1) every time a component is created?
Will that work?
The latter. Just keep in mind that compiling a list may take an unspecified amount of time.

Also keep in mind:

- that display lists have been removed in the core profile, so if you want to use them you need a compatibility profile.

- You can get most of the display list perf with static VBOs and VAOs. You can get all of it with static VBOs and NV bindless extensions, but the latter isn't cross-vendor yet.