Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Uttar

How to draw so that top is bottom and bottom is top?

This topic is 5811 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello everyone, I''m currently using a HUGE indexed triangle list command to draw every tile in my 2D engine. But now, there''s a problem with that. I normally do the translation and all that stuff but for a reason or another, the top is the bottom and the bottom is the top. So, i supposed a 180 degree rotation would make top become bottom and bottom become top - thus making everything look normal. But then the left becomes right and the right becomes left! So my question is the following: Is there a way for top to become bottom and bottom to become top WITHOUT left becoming right and right becoming left? Uttar

Share this post


Link to post
Share on other sites
Advertisement
Yeah, you flip it (no turning involved). say you have the triangle with points at (2,4),(9,9),and (6,4) and your screen height is 10 and width is 10 (you know, like if your working with a TI82 or something). Just take the y values (don''t change the X) and figure out how far away it is from the closest edge. Now just take the value of the other edge and add that value you got previously. ex: (2,4) would become: 0-2=-2 10+(-2)=8 so its (8,4) (the same can be done if you want to change left and right but not top and bottom) Just think about it a while, it becomes logical if you look at it long enough.

Share this post


Link to post
Share on other sites
Most of the time we just say "upside-down" instead of "top is bottom and bottom is top".


-David

Share this post


Link to post
Share on other sites
I believe there is an option when setting up either the view matrix or the projection matrix to define up as top or bottom.

...I just looked it up, its the fourth parameter in the view matrix.

,Jay

Share this post


Link to post
Share on other sites
True, you can set an Up-vector, but doesn''t that just rotate the scene 180 degress?
I think i''d just multiply the Y-coords of the vertices by -1...

T

--
MFC is sorta like the swedish police... It''''s full of crap, and nothing can communicate with anything else.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!