PDA

View Full Version : Find Cordinates



viveksrivastava
07-09-2013, 01:09 AM
My question is:

Is there a way to retrieve the coordinates of a vertex after translations or rotation?

Example: x = 10, y = 10, z = -2

After a calls to glRotate(45,0,1,1) how can I know the actual status of x, y and z?

Thanks.

GClements
07-09-2013, 01:20 AM
Is there a way to retrieve the coordinates of a vertex after translations or rotation?
In older versions of OpenGL: feedback mode (glRenderMode(GL_FEEDBACK)).
In newer versions, transform-feedback mode (glBeginTransformFeedback).

If you're only doing this for a small number of vertices (rather than entire meshes), you're probably better off just performing your own matrix arithmetic in the application.