TANK - CHAPTER 8

In chapter 8, we learned about color and smooth shading. So for this step in
our simulation, I'm just going to add some color to the objects in the scene.

The only fundamental change to this chapter will be that the two OpenGL 
related windows will no longer be able to use the same pixel format. The main 
view window will now need a depth buffer in order to do hidden surface 
elimination (for the wire framed world in the last chapter, hiding surfaces 
is a non-issue). I've also replaced any calls to auxWirexxx to auxSolidxxx
Two things you may notice in particular for this example. The first is that
I've used a 32bit depth buffer. Many of the cheaper OpenGL acclerators only
accelerate 16bit depth buffered Pixel formats. However for a scene this large,
I was getting many rendering artifacts (inaccuracies) at the 16bit level. You
can see this yourself if you change the code and recompile. Then switch the 
view to the robot and approach the tank on the right hand side. The wheels
and the side of the tank body melt start to flicker as you approach or back 
away. Even with a generic software implementation, performance is still
pretty good.

The second thing you may notice is that you can walk right through any object.
Once inside, the object is not visible because we did back face culling.

Richard


