Coordinate .... system...


I have a problem with setting up a 2D view. I crate a 800 x 600 window. And i set up the view the following way

glOrtho2d ( 0.0, width, 0.0, height );

its fine but when i put a point at (0, 0) that point is in the middle of the window. I was trying to get the point (0,0) to be at the bottom left of the window.

| |
| |
-> ±-------------+

I tried changing the values around with glOrtho2D function but it didn’t work. Does anyone have an idea how to do so…


sorry the sqare i made came out a bit messed up

Can think of two things.
1: You are doing transformations (which you are unaware of) in the modelview matrix, which translates the point to the middle.
2: You have called glViewport with the wrong aguments.