PDA

View Full Version : Calling display lists are slower



SSR
07-10-2005, 07:59 PM
Hi
I am drawing 1200 points by glVertex3f() in single display list with GL_COMPILE option.When i am calling the display list to draw by glCallist the drawing is getting slow.I am creating 120 display lists for each 3degrees in a circle.Calling of first few display lists are faster but then afterwards it draws in bunch (30degrees).what i want to draw is smooth 1200 points in 3 degrees ion 32milli second time.

Any Ideas?
Please Help

Thanks in advance

Sean Farrell
07-13-2005, 01:30 AM
It sounds like you have a case of memory exhaustion. When your card starts running out of memory the driver stats pumping the AGP memory (if applicable) full. If even this is full it starts putting stuff in RAM. At this point it dose not really make a difference if you use a display list or draw it directly.

I am not sure what you are tiring to do. You are not very descriptive. But it sound as if you are rotating an object. If I am correct use only one display list and apply proper glRotate calls. You do not gain anything since the vertices & co will be multiplied by the current matrix, even if it is the identity.

SSR
07-14-2005, 12:48 AM
No i am not trying to rotate any object.What i actually want is to draw 400 pixels in each angle for 360 degrees.I am creating NewList after every 3 degrees.Thus Each newList is containing 1200 pixels.

It is drawing properly for first 60 degrees but after that instead of drawing smotthly it is drawing with jumps of 30 to 45 degrees.

I am using 24 bit color coding.Whether switching to 8 bit color will help me?

My Video RAM is not Dual ported and i am not having AGP also.

I dont know exactly whether New display lists are stored in system memory or graphics card memory.

Thanks for your reply

yooyo
07-14-2005, 02:53 AM
You didn't tell us hw spec. Is it NVidia, ATI, Intel, SiS...., which driver version, OS,...

Sort points in groups of 3degrees and then all groups copy in single VBO and instead of display lists use glDrawArrays call.
So.. indices 0..1199 in range 0-3 degrees
indices 1200..2399 in range 3-6 degrees
...

Do not switch to 8bit modes, on most graphics card it is not accelerated.

yooyo

T101
07-14-2005, 03:33 AM
No i am not trying to rotate any object.What i actually want is to draw 400 pixels in each angle for 360 degrees.I am creating NewList after every 3 degrees.Thus Each newList is containing 1200 pixels. May I suggest that you think about that for a bit longer?
OpenGL is a rendering API. You can render the same display list as many times as you like, and all you need to do is put a couple of glRotates in between.
From your description all the lists are the same, with only the start and end angles rotated by 3 degrees.
Here's what you'd do:
1. set up one display list, for the 1200 points of the 3 degree arc.
2. When rendering, after you've set the location of the sphere, do a glPushMatrix(), glCallList(), glRotatef(0,3,0), glCallList(), glRotatef(0,3,0), glCallList() etc. then do a glPopMatrix().
For more precision you could place a PopMatrix and PushMatrix pair before each glRotate (although in that case you'll need to specify 6, 9, 12, 15, 18 etc in the glRotate)