#### Archived

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

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

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

## 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 on other sites
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 on other sites
Most of the time we just say "upside-down" instead of "top is bottom and bottom is top".

-David

##### 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 on other sites
Make matView(1,1) (2nd row, 2nd column) -1.

Steve

Steve
DirectX Programmer
Soon to be the new Bill Gates

##### 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.

1. 1
Rutin
27
2. 2
3. 3
4. 4
5. 5

• 11
• 9
• 9
• 9
• 14
• ### Forum Statistics

• Total Topics
633313
• Total Posts
3011321
• ### Who's Online (See full list)

There are no registered users currently online

×