I try to learn OpenGL by creating some sort of 3D Modeler application using Visual C++. The screen will be divied into three window : perspective, front and top (isometric). And I almost give up try to implement the top view. This is my current top view code :
glOrtho(-1,1,-1,1,1,3.5f);
gluLookAt(
0,2,0,//eye
0,0,0,//center
0,0,-1);//up
But if I move the object to to the far Z, it will certainly disappear. How can I make the top view able to look at all object in the scene???
How can I compute the required parameter fo glOrtho and glLookAt?
You need to adapt the z far value according to your geometry. You should compute a bounding sphere or bounding box of your model, find the Z range and adapt your camera according to it.