As you can see after the eye() call it is followed with a translate in the z direction.
For me to get the 0,0 coordinate in the left top corner I have to do something like:
translate(-width/2, -height/2, 1350);
But the 1350 is just guessing and will probably fail on larger or smaller screens or screen with a different aspect ratio.
void begin_2d() {
pushMatrix();
resetMatrix();
// TODO figure out how this is defined
applyMatrix(
001.0000, 000.0000, 000.0000, -960.0000,
000.0000, 001.0000, 000.0000, -540.0000,
000.0000, 000.0000, 001.0000, -935.3074,
000.0000, 000.0000, 000.0000, 001.0000
);
noLights();
}
void end_2d() {
popMatrix();
}
I got the coordinates from using a regular app first and checked that matrix.
Although it looks close it is still incorrect.
If someone could still help with the issue that would be really great.