glTranslatef(-50.0, -30.0, -100.0);
it is fine to see but i can not see the whole area, if i change it to
-110 etc i do not see any of my cubes from my display list.
Look-up the glOrtho command.
void glOrtho(GLdouble Left,
GLdouble Right,
GLdouble Bottom,
GLdouble Top,
GLdouble Near,
GLdouble Far)
You should have something that looks like:
glOrtho(0.0f, 640.0f, 480.0f, 0.0f, -256.0f, 1.0f);
(Please note that these values makes OpenGL simulate screen coordinates)
The alternative is:
void gluOrtho2D(GLdouble left,
GLdouble right,
GLdouble bottom,
GLdouble top)
Which is equal to
glOrtho(left,right,bottom,top,-1,1);
OpenGL does not use screen coordinates , it uses floating point values of between 0 and 1 (or -1 and 1 rather) so punching in values into glTranslate that are greater than 1 or less than -1 will result in the object being translated off the screen past a clipping plane.
If you want to use screen coordinates. Use the glOrtho command like this:
glOrtho(0.0f, screenwidth, screenheight, 0.0f, -screendepth you want, 1.0f);
But remember that this will not have an effect on all gl commands.