Ugh, this has been driving me insane. I always use glOrtho() to set up the projection matrix for my 2D drawing section, and usually it’s something along the lines of:
glOrtho(0.0, 640.0, 480.0, 0.0, -1.0, 1.0);
So I can have it fit rather uniformly in my 640x480 viewport. Now, is that TL-BR (0,0)-(640,480) inclusive or exclusive or is it not that at all? I’ve noticed if I do a GL_QUAD with vertices that have X coordinates of 1.0 there is a pixels width of black along the edge, but with GL_LINE_LOOP an X coordinate of 1.0 will be the very first pixel. Quite disconcerting, disruptive, and disorienting.
I guess my question is, are the boundaries passed to glOrtho() inclusive, and if so, am I going the right way to get a matrix set up where there will be a 1:1 ratio of coordinates to pixels in the viewport?