As the title says, I'm trying to draw stuff in immediate mode in window coordinates - which is probably the wrong term. That is, the coordinate system that has its origin in the top left corner of the window, with its Y axis expanding downwards the height of the window, and its X axis expanding sidewards along the width. I want to be able to draw a line from the top-left corner to the bottom-right corner like this:
glColor3ub(255, 255, 255);
glBegin(GL_LINES);
glVertex2f(0.0f, 0.0f);
glVertex2f(1280.0f, 720.0f);
glEnd();
Yes, I am aware that immediate mode is deprecated, but please answer within old OpenGL's context. How do I need to set up OpenGL's matrix stack so I can draw in window coordinates, like seen above? Thanks in advance!