I have done programming in OpenGL and I know how to set the viewable area in it with gluOrtho(), but a function like this does not exist in OpenGL ES 2.0.
How would I do this in OpenGL ES 2.0?
P.S : I am doing my OpenGL ES 2.0 development in Ubuntu 10.10 with the PowerVR SDK emulator.
As Nicol suggests, you’ll want to set up an orthographic projection matrix. For example, an Objective-C method I use to do this is as follows:
Even if you’re not familiar with Objective-C method syntax, the C body of this code should be easy to follow. The matrix is defined as
You would then apply this within your vertex shader to adjust the locations of your vertices, using code like the following:
Based on this, you should be able to set the various limits of your display space to accommodate your geometry.