2d problem

Started by
1 comment, last by ProblemBaby 18 years, 11 months ago
Hi I try to draw some 2D, I read the FAQ but I dont want to draw upside down=/ If I do: scalef(1,-1, 1); or glOrtho(0, vport[2],vport[3],0,-1,1) I loose one line at the top of my projection. Can i somehow fix this? If I translate it seems that DrawPixels/recti also is affected. So Ive no idea of to fix this strange problem, any ideas? thanks in advance
Problems every where
Advertisement
I am confused on what you are asking? Do you mean you don't want the window coordinates in x,y to be reversed? If so just take the screen height - current Y position = new y

I mean that I want them in "real" screen coordinates.
But its strange things happening.
for example DrawPixels/recti is postioned correct.
all vertices Ive tested is wrong except for QUADS they are drawn correct.
But lines aren't.

When I say wrong I mean that for QUADS y = 0 is drawn at line 0
But Lines that has a y = 0 is drawn at line -1

Ive set up my ortho like this:
glOrtho(0, screenWidth, screenHeight, 0, -1, 1);

I tried:
glOrtho(0, screenWidth, screenHeight, -1, -1, 1);
and in that case Lines are drawn correct.
But not QUADS and the DrawPixels.

I dont understand whats happening!
plz some info would be really nice!
Problems every where

This topic is closed to new replies.

Advertisement