I want to perform picking on some objects that have their own local coördinate system.
To draw those local objects, i push & pop a transformation-matrix and draw the objects as if they were in the origin.
if i use the same transformations in glRenderMode(GL_SELECT); to build a selection buffer the selection does not work. Is this because those transformations are not supported in GL_SELECT? Does anyone know this problem and what can i do about it?
p.s.: The selection works ok with absolute coordinates, so without using the local coordinatesystem.
tnx in advance
[This message has been edited by JeeTriX (edited 05-21-2002).]
They should work. You can debug by rendering the area you cliked on. Are you using gluPickMatrix? If so, then maybe the problem lies there.
It went something like
gluPickMatrix(…); <-- what’s in here?
glFrustum or glOrtho
I know they should work because if they don’t, they would be pointless. But i had already a decent amount of problems with selection due to the lack of openGL support on the matrox i’ve been testing on, so i would not be astonished if this was a known problem…
Anyway, i’ll paste some of the code to make sure all my calls are right:
…(here i draw)…
GLint hits = glRenderMode(GL_RENDER);
How can i render the area i clicked on?
[This message has been edited by JeeTriX (edited 05-22-2002).]
If you want to render, just remove the glRenderMode commands you got there, and repaint the scene when you click.
But I dont see a problem with the code. You can try the red book examples to see if they work.
Whatever it may be that keeps me away from selcting my objects, i’m gonna ignore it & do raytracing i’m on it for 2 days now, i can’t even see what i draw in that selection buffer… i’ll assume the mode is not supported perfectly on my card…
What is your card + driver exactly?