Background issue

I’m drawing my landscape like this:

while(1)
{
update gl matrix with that of the camera
draw landscape
swap
}

i’m not doing depth buffer testing, and drawing with a black background.
How can I put a background there? Draw a huge textured cube or cylinder with center 0,0,0 or what? please help me…

draw a textured cube (of any size as long as its within the clipping range) centred on the viewer. That way it appears to be at an infinite distance, and you don’t get any strange distortions.

More info : You’ll have to display that cube BEFORE your landscape.

You could replace your color buffer clear
with drawing a skybox. Search this forum for
skybox mechanisms. It’s really quite easy;
the hardest part is generating/finding
textures rendered with the correct projection.

>>More info : You’ll have to display that cube BEFORE your landscape.

Right in this case.
With z-buffering it probably would make sense to draw the backdrop/skybox at last to get more z-test fails. If the world has been drawn, you’ll probably don’t see much from the sky anymore.

[This message has been edited by Relic (edited 02-04-2001).]