• FEATURED

View more

View more

View more

### Image of the Day Submit

IOTD | Top Screenshots

### The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

# 3d-vertex to 2d-screencoordinates

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

4 replies to this topic

### #1IStrikerI  Members

Posted 29 September 2001 - 05:46 AM

i need to convert a 3d-vertex to 2d-screencoordinates. how can i do that ? i thought about doing a special calculation with the vertex and the two matrices (projection and modelview).

### #2Crazy_Vasey  Members

Posted 29 September 2001 - 06:58 AM

ScreenX = X/Z
ScreenY = Y/Z
ScreenZ = Z/Z = 1

giving you the (x,y) co-ords. That''s the way I know someone will probably know a better way :p

### #3Null and Void  Members

Posted 29 September 2001 - 07:27 AM

You can use gluProject and gluUnProject to convert back and forth. If you''re trying to draw a 2D object you can use an orthographic projection matrix.

[Resist Windows XP''s Invasive Production Activation Technology!]

### #4IStrikerI  Members

Posted 29 September 2001 - 09:22 AM

yeah, thats the function i needed !! thx

but if someone has the real mathematical calculation for this,

### #5masonium  Members

Posted 01 October 2001 - 03:36 PM

I''m not sure of the exact mathematical calculation, but I know the vertex goes through the modelview and projection matrices in order to be displayed on a 2D screen

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.