Advertisement Jump to content


This topic is now archived and is closed to further replies.

Brett Crain

OpenGL OpenGL: Sphere Optimization

This topic is 6555 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a 3D world that has approximately 50 spheres in it made with: gluSphere(q,size,8,8); and while I''ve dropped the quality of the sphere to the lowest possible value without looking like utter garbage (from 16 to 8), the performance is still much slower than I''d like. Does anyone have any ideas on how drawing all these sphere could be optimized? Such as storing the sphere so I can "paste" it repeatedly...

Share this post

Link to post
Share on other sites
I believe gluSphere(...) builds up the sphere each time from scratch.

If you put the call the gluSphere(..) inside a display list, you would avoid having to build up the sphere each time, and display list are much faster at drawing objects than calling drawing the individual triangles anyway.

You ought to try making your own spheres (they aren''t that hard to generate) and then you could see exactly what''s making your code slow.


Game production:
Good, quick, cheap: Choose two.

Share this post

Link to post
Share on other sites
Hmm.. i just finished making the modifications so that the spheres are displayed from a list using the CallList() function. However, I''m still getting the same framerate any other ideas out there?

By the way, im not generating the Display List each frame if anyone thought i might be doing that.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!