PDA

View Full Version : am i doing this right?



lee
03-11-2001, 06:46 PM
i'm using the feedback buffer to get the coords of an object, using GL_3D. i printed the buffer, and it looks like this:
feedBackBuff[0] == 1792.000000 // GL_PASS_THROUGH_TOKEN
feedBackBuff[1] == 1.000000
feedBackBuff[2] == 1795.000000 // GL_POLYGON_TOKEN
feedBackBuff[3] == 3.000000 // number of verts
feedBackBuff[4] == 125.000000 // but what is this?
feedBackBuff[5] == 125.000000
feedBackBuff[6] == 0.800160
feedBackBuff[7] == 154.793945
feedBackBuff[8] == 125.000000
feedBackBuff[9] == 0.800160
feedBackBuff[10] == 154.793945
feedBackBuff[11] == 154.793945
feedBackBuff[12] == 0.800160
feedBackBuff[13] == -107374176.000000
ok that's great but i thought at Buff[4], this should begin the coords of where i picked. the object is at (1, 1, -3) which is no where near(125, 125, 154) like it says in the buffer. is the buffer in coordinates, or in pixels? also, in the book it says that unsing GL_3d, i should get 3 total values returned. well i got 13. why? thank you for responding, in advance...

RandyU
03-11-2001, 07:42 PM
It returns coords after all transformations. So, they are pixels.

lee
03-12-2001, 09:16 AM
so if the returned values are in pixels, then why am i getting fractional values? how can i get 0.793945 of a pixel?