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:
- (void)loadOrthoMatrix:(GLfloat *)matrix left:(GLfloat)left right:(GLfloat)right bottom:(GLfloat)bottom top:(GLfloat)top near:(GLfloat)near far:(GLfloat)far;
{
GLfloat r_l = right - left;
GLfloat t_b = top - bottom;
GLfloat f_n = far - near;
GLfloat tx = - (right + left) / (right - left);
GLfloat ty = - (top + bottom) / (top - bottom);
GLfloat tz = - (far + near) / (far - near);
matrix[0] = 2.0f / r_l;
matrix[1] = 0.0f;
matrix[2] = 0.0f;
matrix[3] = tx;
matrix[4] = 0.0f;
matrix[5] = 2.0f / t_b;
matrix[6] = 0.0f;
matrix[7] = ty;
matrix[8] = 0.0f;
matrix[9] = 0.0f;
matrix[10] = 2.0f / f_n;
matrix[11] = tz;
matrix[12] = 0.0f;
matrix[13] = 0.0f;
matrix[14] = 0.0f;
matrix[15] = 1.0f;
}
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
GLfloat orthographicMatrix[16];
You would then apply this within your vertex shader to adjust the locations of your vertices, using code like the following:
gl_Position = modelViewProjMatrix * position * orthographicMatrix;
Based on this, you should be able to set the various limits of your display space to accommodate your geometry.