This program is freely distributable without licensing fees and is provided without guarantee or warrantee expressed or implied. The example has a mode using OpenGL stenciling to avoid drawing the reflection not on the top of the floor. Also, notice that OpenGL lighting works correctly with reflections. The idea is draw the floor without color or depth update but so that a stencil value of one is where the floor will be. Later when rendering the dinosaur reflection, we will only update pixels with a stencil value of 1 to make sure the reflection only lives on the floor, not below the floor.
Easy solution is just disable back face culling for rendering the reflection.
We could have fixed the dinosaur rendering code, but this is more expedient. Restore light positions on returned from reflected space. Back face culling will get used to only draw either the top or the bottom floor. This let's us get a floor with two distinct appearances. The top floor surface is reflective and kind of red.