Here is an example of my camera
private void renderCamera(Camera camera) {
// Size And Position
Vector3f pos = camera.getPosition();
Vector3f size = camera.getViewport();
Vector3f center = camera.getCenter();
// Do we need to zoom the camera?
float zoomFactor = camera.getZoom();
if (zoomFactor != 1.0f) {
GL11.glViewport(0, 0, (int) size.x, (int) size.y);
GL11.glOrtho(0, size.x / zoomFactor, size.y / zoomFactor, 0, -100, 100);
}
// Move the matrix with teh camerca
GL11.glTranslatef(-pos.x + center.x, -pos.y + center.y, pos.z);
GL11.glRotatef(camera.getRotation(), 0.0f, 0.0f, 1.0f);
GL11.glTranslatef(-center.x, -center.y, -pos.z);
}