Hi, it's clear now,
jeffer wrote:
When I pick/select the line created above, sometimes it give the correct selectionID using the OpenglView::select() in GLC_player, sometimes the selectionID is not correct. Could you please give some details how to use GLC_3DViewCollection for the geometries I want to select? Thanks.
It seems that there is no problem in your code. I think that the problem com from
anti-aliasing...
In GLC_lib, the selection of object is done by rendering the scene off-screen with specific color for each 3DViewInstance.
It's work fine with solid object. But, if
anti-aliasing is on, the color of wire object is blended with the background color (Black) and border of a
white wire become grey 
So the grey color is decoded and a wrong id is return.
As I know, when using Qt4 in OpenGL application, there is two way to activate anti-aliasing :
If you use the first one you have to deactivate it. But the render will be aliased
If you use the second one, you just have to deactivate it in your code when you render in selection mode.
Something like that in the paintGl method:
Code:
if (!GLC_State::isInSelectionMode()) glEnable(GL_MULTISAMPLE);
else glDisable(GL_MULTISAMPLE);
@+