PDA

View Full Version : Selection problem



yaro_dup1
08-01-2003, 11:05 AM
Hi,

I have a little problem. I'm drawing a triangle strip something like this:



glBegin( GL_TRIANGLE_STRIP );
for( int i = 0; i < n; i++ )
{
glVertex3f(...);
glVertex3f(...);
}
glEnd();

I want to determine which triangle of 'n' size triangle strip has been clicked. Problem is that I can't call glLoadName inside glBegin(); ... glEnd(); because it gives nothing.
I also can't call glPushName() every time because 'n' size is greater than max_name_stack_depth.
Could someone give me any idea?

Thanks

Bob
08-01-2003, 11:44 AM
Split the strip and draw the triangles separately.

yaro_dup1
08-02-2003, 01:08 AM
I know this, but I wanted to increase the performance a little. but looks like that a have to do this that way.

Thanks anyway