Glarrays in display list?

i’ve already posted this message, but i hadn’t got any precise answers.

can i do such a way ?

glEnableClientState( GL_VERTEX_ARRAY);

glVertexPointer(…);

glNewList();

glDraw*Element(…);
glEndList();

but it doesn’t work !

without the list, that works ! But i want to keep the display lists.

last time i put this question, we said me that Quake 3 uses display list.

does anyone can confirm that ? where can i see that ?

i think you can’t use displaylists here, because glEnableClientState() depends on the client, so it can’t be precompiled.
nevertheless, convert your array into concrete vertices and then compile. it should work then.

best regards,
Tolga.

umm, ive drawn vertex arrays in display lists just fine, so it can be done.

try setting the vertex pointer in the display list…

you wrote glNewList(); is this just a typo? there should be a value that you pass to it (1 is good if you are only using one display list). if you are drawing more than one display list, you should be using glGenLists. if it is just a typo, then try what i suggested above. i think i had the same problem, and puting th vertex pointer call in the display list fixed it…

oh, i just recognized i was very wrong: you may use glEnableClientState() with displaylists. you only may not put this call INTO a list itself.
tnx, folks.
l8ers,
Tolga.

mery xmass !!

thanks for replies.

what said my book is that i must set client state outside the list, as calling gl arrays, but i can (or must) tell glDraw*Element() inside the list.

concerning glGenList…, it was just generic, not my real code (sorry SpiralMan).

my problem is that i have no display when using this method. but i’m sure this will increase my performance (then i could put the arrays in the vram !)

happy new year!

regards

JD

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.