Jump to content
  • Advertisement

Archived

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

Brett Crain

OpenGL OpenGL: Sphere Optimization

This topic is 6395 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
Advertisement
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.


cheers
dan

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 GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!