I'm trying to draw several speheres using the gluShpere function. The problem is that if I draw several spheres with high polygon count (slices and stacks parameters are 32), the spheres don't appear on the screen, and after aboute 30 secons I get an error and the application exits.
If I change the parameters to lower numbers the application works fine and I can see the spheres (with less polygons).

My scene is very simple and contains only those spheres.

Is there some kind of limit on the polygon count you can draw? and if there is, how can I change it?

Thanks!

mikael_aronsson

11-17-2002, 11:32 PM

Hi !

Short answer, no, there is no limit. OpenGL is uses a pipeline for the rendering, you send it triangles and OpenGL renders them, when a triangle is rendered it can be thrown away.

So your problem is either a driver problem or your best bet, a bug in your code.

You may have a displaylist that you try to put the spheres in for example ?, if you run out of memory you may get weird stuff.

Mikael

[This message has been edited by mikael_aronsson (edited 11-18-2002).]

11-22-2002, 05:24 AM

I am using a display list to draw the spheres, is there a memory limit for a display list?

31337

11-22-2002, 06:37 AM

Does your program have a memory leak (which I think is trying to reference further into an array than exists)? This happens to me a lot when I'm using dynamic memory. Let me give you an example of what happened to me:

Does that make sense? Sorry if its just ramblings but if your using dynamic memory that could be your problem!

11-22-2002, 10:57 AM

I don't think this is the case because all I do is change the parameters of the gluSphere command, with high parameters it doesn't work, and with low parameters it works.
And you were right about the display list, I copied the code and used it outside of the list and it works fine, even with high parameters.
But I don't understand why the display list causes a problem?