View Full Version : sky and gluPerspective depth

08-08-2002, 06:03 AM
What is correct way to code sky in OpenGL?
Should I draw huge sphere with sky texture?
But how big this sphere should be?
Should I move this sphere with camera, or just make it static like terrain?
In gluPerspective I set depth to 7000. When I will draw sphere around my terrain - this value will be increased. There are disadvantages of increasing depth - for example worse z-buffer. Isn't true?
Or maybe instead sphere I should draw just one big quad? Or triangle? What's your solution?

08-08-2002, 06:17 AM
What you need is called "skybox"...it is just a huge cube that you have to render first of all, before any other object...and yes! this cube should "follow"the camera when it is translated...try to do a search in this discussion forum with the keyword "skybox": you will find that other people (me included) had the same problem: so you can learn a lot.

08-08-2002, 11:13 PM
You dont need a BIG one.. just draw it first with depthwrite disabled.. then its gonna be so far way it can be..