schailan
06-12-2002, 12:35 AM
hi,
if i create an object as follow:
glNewList(300, GL_COMPILE);
glBegin(GL_QUADS);
glVertex3d(0.0, 0.0, 0.0);
glVertex3d(50.0, 0.0, 0.0);
glVertex3d(50.0, 0.0,50.0);
glVertex3d(0.0, 0.0,50.0);
glEnd();
glEndList();
in order to pick it by mouse, is the following code right:;
glLoadName(0)
glCallList(300);
my pb is that the hit returned is 0, when i invoke glRenderMode(GL_RENDER)
but if i replace my object by glutSolidCube(50), now it works !!!!!
WHY?
another question:
is the selection depending on the texture mapped to the object?
is the selection depending to the location of the camera with gluLookAt, by using the projection transform?
thx!
if i create an object as follow:
glNewList(300, GL_COMPILE);
glBegin(GL_QUADS);
glVertex3d(0.0, 0.0, 0.0);
glVertex3d(50.0, 0.0, 0.0);
glVertex3d(50.0, 0.0,50.0);
glVertex3d(0.0, 0.0,50.0);
glEnd();
glEndList();
in order to pick it by mouse, is the following code right:;
glLoadName(0)
glCallList(300);
my pb is that the hit returned is 0, when i invoke glRenderMode(GL_RENDER)
but if i replace my object by glutSolidCube(50), now it works !!!!!
WHY?
another question:
is the selection depending on the texture mapped to the object?
is the selection depending to the location of the camera with gluLookAt, by using the projection transform?
thx!