Console Projection Matrix

Sep 17, 2012 22:39


The console was upside down because it was using the wrong projection matrix. I ran a blank level, opened the console, and dumped the frame using GLIntercept. The console projection looked suspiciously like the virtual 640x480 overlay projection, and I confirmed it by running the game at a higher resolution. The console font scaled up instead of staying the same size.
The console tried to load its custom projection matrix but failed because ProjectionLoad always loaded the matrix into the zeroth slot instead of the top of the stack. This was an artifact of an earlier time where projection was a single matrix instead of an actual stack. It'd been broken all along but using the matrix stack instead of a custom save/restore uncovered the problem.

Derp...

Anyway, the console works properly now. That's what matters.

opengl, programming, shmup

Previous post Next post
Up