Hi there,
I was building a 2D project in OpenGL ES 1.1 but decided to switch to 2.0 since I was only going to be developing for the iPad.
In 1.1, when a viewport is set up, the notion seems to be that you are viewing only a part of the full 3D space e.g.
CGRect rect = view.bounds;
glOrthof(-1.0, // Left
1.0, // Right
-1.0 / (rect.size.width / rect.size.height), // Bottom
1.0 / (rect.size.width / rect.size.height), // Top
0.01, // Near
10000.0); // Far
glViewport(0, 0, rect.size.width, rect.size.height);
(Taken from Jeff LaMarche's tutorial on OpenGL ES)
From everything I've seen of 2.0, there is no GlOrthof method to specify what you're looking at, only the glViewport call, which is described as setting up the plane on which you're drawing.
My intention is to draw a 2D wireframe map that you can zoom into and pan around. I assumed to achieve this I would draw inside and outside of the viewport and then change the viewport coords as the user panned around.
How do you draw outside of the viewport in OpenGL ES 2.0?
Is this the correct way of achieving what I want to achieve?
Have I misunderstood everything entirely?
Thanks for your help with this!