Hello,
> > The cube is behind the camera. Replace "glTranslatef (0.0f, 0.0f,
> > 50.0f);" by "glTranslatef (0.0f, 0.0f, -100.0f);".
> Thank you very much, it does work.
You're welcome.
> But how do I know, where the camera is in this case?
The cube is drawn at the origin. With the call you made, you told to
move the camera 50 forward, resulting in having the cube behind it
(well, the camera was actually inside the cube, and it was invisible
because of the backface culling). With the new call, you tell the
camera to move 100 backward, therefore allowing to see the cube.
Does it make sense to you explained that way?
--
Julien Guertault
|