PDA

View Full Version : Backgrounds



MCote79
06-14-2001, 04:44 AM
Hey,

I'm doing a 3-D scene and I need a background. Right now I just have a huge cube around my scene with the background textured to the inside of the box. I translate the box everytime you move in the scene so that you can never approach the background and therefore never go beyond it.

I know that there must be better ways to do this but I can't find anything on them. I looked quickly through the NeHe tutorials and it seems that he was doing it this way. Does anybody know a better method for doing the background?

kistompika
06-14-2001, 06:15 AM
The problem with this method is that when you render a face in your scene, you render the background first, so you render every pixel at least twice. So I suggest drawing the sky as seen in Quake. For examle you have an cube with an open side (it has 5 faces). You draw the other one too, with cube mapping. The cube map is defined to be the background. (GL_EXT_texture_cube_map extension needed)