View Full Version : picking + pusmatrix
05-21-2002, 12:01 AM
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 http://www.opengl.org/discussion_boards/ubb/smile.gif
[This message has been edited by JeeTriX (edited 05-21-2002).]
05-21-2002, 01:49 PM
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
05-21-2002, 11:44 PM
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).]
05-22-2002, 04:00 PM
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.
05-23-2002, 12:58 AM
Whatever it may be that keeps me away from selcting my objects, i'm gonna ignore it & do raytracing http://www.opengl.org/discussion_boards/ubb/smile.gif 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...
05-23-2002, 05:49 PM
What is your card + driver exactly?
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.