PDA

View Full Version : Vertex to pixel



Phynix
05-15-2009, 03:51 PM
I was wondering how to convert a world coordinate (x, y, z values) to 2d pixel coords. Ive seen gluProject/gluUnProject but they're too slow for game programming, every (if not every 10) frames. Thanks!

Ilian Dinev
05-15-2009, 04:39 PM
you simply create a 4x4 matrix, and multiply by it. gluProject does that.

dletozeun
05-15-2009, 05:05 PM
...but they're too slow for game programming, every (if not every 10) frames. Thanks!


That sounds a little weird since games graphic engines are full of matrix operations which is what gluProject does actually...

Perhaps you say that because it is not exactly what you need since gluProject also computes the modelview transformation.

Phynix
05-16-2009, 12:45 PM
maybe...but i found a way to do what I want to do without converting to screen coords. Thanks anyway.