PDA

View Full Version : ATI can't use glDrawElements in a display list?



avocados
08-10-2005, 02:13 PM
I'm coding on an nVidia card with no problems but objects drawn with glDrawElements inside a display list don't show up at all on a Radeon 9800 pro. Those same draw functions work in immediate mode, what can be done?

jide
08-10-2005, 02:21 PM
Normally, you don't use that kind of functions inside display lists. As for that kind of functions is not for immediate mode (immediate mode = glBegin(...); ... glEnd() ;) . Vertex arrays, even if not used by CVA, VAR, VBO and such aren't in immediate mode.

On some cards you might can, but that might not be sure. At least don't call to glVertexPointer... inside the display list.

Use immediate mode inside display lists. The code is then compiled, thus faster than if not inside a display list.

Hope that helps.

Humus
08-10-2005, 03:51 PM
Are you saying that it works on nVidia cards but not on the 9800? Otherwise, glDrawElements() inside a display list can be a bit tricky as it doesn't capture a glDrawElements() call as such, so that you can call a display list and expect it to grab data from currently bound arrays, instead it captures the data when building the display list and uses that.

avocados
08-10-2005, 04:41 PM
I see, it IS kind of a wacky thing to do. But it was convenient for me to test my arrays and worked on the nVidia card. Also I thought drawing arrays in system memory were considered immediate mode. Thanks guys, I'll have to go read up on VBOs then.