Advertisement Jump to content


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



This topic is 6779 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

What is the best way to do a sphere for a skydome in openGL? I''ve tried some things, but I still dont know how to do it. I really could use some help! Thanks...

Share this post

Link to post
Share on other sites
I''ve found that it''s generally easier and faster to use a sky-box instead. Some idea, but instead of drawing dome you just put a cube around the player. It looks just about as good.

But to answer your question:

For the sphere, I believe that glu has a sphere function. You should probably look that up. Also, make sure you set the cullmode correctly.

"Don't worry about it sir, it's an eye-dee-ten-tee error -- takes too long to explain -- have a nice day."
I d 10 t

Share this post

Link to post
Share on other sites
Vell, eez acshually wery sympeel. Just e-mail me and I''ll send you the dome class from a small demo I wrote a month or two ago. Kinda simple. Kinda undone. Does not use GLUT. But, it does draw a static textured, vertex lit, sky dome. So it should give you a start. You can control such things as the radius, z-scaling, vertical divisions, horizontal divisions, how big a slice off the top of a sphere you want for your dome, origin of the dome, etc.

However, an improvement that I may do (if I''m not more motivated by doing something else) is to rewrite it to calculate the vertexes as a geodesic dome. If you look at Dagoth Moor Zoological Gardens in wireframe mode, you''ll see what I''m pretty sure is a geodesic dome instead of a sphere. Theirs looks a lot smoother than mine at the same number of triangles. Plus, the triangle fan at the top of my spherical dome stands out unless vertical divisions of the sphere is pretty high. I''m pretty sure I can do the geodesic dome with no triangle fan.

Something else I probably don''t have right in my demo is the lighting settings. Anyone want to guess how the lighting is set for the sky in DMZG? Even though DMZG is a demo for nVidia T&L, are they using lightmaps, as well? I can''t decide.

Mike Roberts
aka milo

Share this post

Link to post
Share on other sites
Go to if you download the source you''ll see a coloured skydome class. You provide the angle of the sun and it colours the dome for you. Very very cool twilight effects....

It uses the SSG scene graph, but it''d be pretty easy to reverse engineering it back to pure OpenGL.


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!