03-29-2005, 09:30 AM
Does anyone know how to have an ortho projection, and use logical coordinates (e.g: glOrtho(-1.0, 1.0, -1.0, 1.0, -1.0, 1.0)) and yet retain perfect pixel accuracy of the original texture?
It only really matters in fullscreen mode (800x600, 1024x768 etc) but if it extended to windowed aswell that would be even better.
At the moment I have a simple glViewport(0, 0, width, height) followed by (on the projection matrix) glOrtho(0.0, width, 0.0, height, -1.0, 1.0). This retains pixel perfect accuracy (as expected) regardless of resolution, but it also means things get smaller/bigger as resolution is changed. I wanted things to stay the same size across all display modes. Is it even possible?
Anyone have any ideas?
Cheers :)
It only really matters in fullscreen mode (800x600, 1024x768 etc) but if it extended to windowed aswell that would be even better.
At the moment I have a simple glViewport(0, 0, width, height) followed by (on the projection matrix) glOrtho(0.0, width, 0.0, height, -1.0, 1.0). This retains pixel perfect accuracy (as expected) regardless of resolution, but it also means things get smaller/bigger as resolution is changed. I wanted things to stay the same size across all display modes. Is it even possible?
Anyone have any ideas?
Cheers :)