PDA

View Full Version : Matrix transformation



09-03-2005, 02:48 PM
I would like to place the matrix in the top left corner of the window, with the x axis positive left to right and the y axis positive top to down; and each pixel would value 1, I mean for a resolution of 1024x768 if I draw a line with vertexes (0,0,0) and (1024,0,0) I would get a top border for the window

memfr0b
09-03-2005, 03:12 PM
You can use glOrtho or gluOrtho2D for that:

gluOrtho2D(0, width, height, 0)

09-03-2005, 03:35 PM
I used glOrtho but when i draw a quad nothing appears

memfr0b
09-03-2005, 03:53 PM
It could be that your quad lies behind the far clipping plane or in front of the near clipping plane. Or you could have culling enabled and specify the vertices in the wrong order.