I am converting a 2D software rendering application to OpenGL. Treating all drawn points with a Z value of 0 and using this to setup my projection matrix:
gluOrtho2D( [my pixel dimentions] );
The existing code used a 3x3 matrix to convert the model to the display device.
For the modelview matrix, I go from the existing 3x3 matrix to opengl’s 4x4 matrix.
Which cells transfer to which?
Specificly, the x, y translation parts.
m m m[ 8] m
m m m[ 9] m
m m m m
m m m m
I tried them in cells 8 and 9 first. It kind of worked, but didn’t scale correctly as 0 and 5 changed. I read something where the author felt that the 4th column is where translation lives in a 4x4 matrix. So I tried cells 12 and 13. But now the model is nowhere to be seen.
What am I missing?