If you're making a 2D game, you're probably better off using gluOrtho2D instead of glFrustum. To put it in a simple way, using orthogonal projection an object is always drawn the same size, regardless of its distance to the camera.
If you want one 'unit' to correspond to one pixel, call
gluOrtho2D(0, resolutionWidth, resolutionHeight, 0);
where resolutionWidth is the horizontal resolution, and resolutionHeight is the vertical resolution.
In lwjgl, GLU is located in the org.lwjgl.util.glu.GLU class.
So your code will look something like this:
GL11.glMatrixMode(GL11.GL_PROJECTION);
GL11.glLoadIdentity();
GLU.gluOrtho2D(0, resolutionWidth, resolutionHeight, 0);
If you want even more control over your projection matrix, this site gives some good information about creating your own projection matrix:
http://www.songho.ca/opengl/gl_projectionmatrix.htmlTo pass you own martix to openGL, use the the following code:
FloatBuffer buf = BufferUtils.createFloatBuffer(16); //Create a FloatBuffer to hold 16 floats for the 4x4 matrix
//Fill the matrix with your data
buf.
put(2).put(0).put(0).put(0),
put(0).put(2).put(0).put(0),
put(2).put(0).put(1).put(0),
put(-1).put(-1).put(0).put(1);
//Set current matrix to Projection matrix
GL11.glMatrixMode(GL11.GL_PROJECTION);
//Pass your matrix to openGL
GL11.glLoadMatrix(buf);
The matrix I used in the code above is NOT the matrix you asked for, it is one that sets (0, 0) to be the lower left corner, and (1, 1) to be the upper right corner. If you want to make your own matrix, take a look at the site I just mentioned.
I didn't try any of the code so there may be some typo's in it, but I don't think so. And don't hesitate to ask is you have any more questions
