Just trying some picking using the simple GL mechanism. I’m finding I don’t always get all the nodes reported on large areas… is there some resolution restriction I’m not aware of?
Kev
Just trying some picking using the simple GL mechanism. I’m finding I don’t always get all the nodes reported on large areas… is there some resolution restriction I’m not aware of?
Kev
Due to Linux compatibility issues, back-sided faces are not picked (picking back-sided faces causes picking to stop working on some DRI-based drivers, at least CLE266).
Also all the geometry is a subject for frustum and other cullings, so if your geometry has been culled, it definitely will not be picked.
Yuri
I don’t really understand the GL_SELECT thing (although I’m going to go and read about it). Does the current Xith impl re-render the section of the screen specified and records any nodes rendered?
If so, does it adjust the FOV to match what would have been visible on the screen? I’m still getting odd results for what I’d expect to Just Work ™
Kev
From OpenGL docs:
[quote]Selection mode. No pixel fragments are produced, and no change to the framebuffer contents is made. Instead, a record of the names of primitives that would have been drawn if the render mode was GL_RENDER is returned in a select buffer, which must be created before selection mode is entered
[/quote]
Actually, it first adjusts the FOV/View Frustum to the same used for normal rendering, and then narrowing it to the selection spot (not ray!). If you will just replace GL_SELECT with GL_RENDER, you will see your scene zoomed out to the full GL context area, so the picking spot will occupy all the window. All the objects that will be visible in this window, will pass selection test (even if they are occluded).
Software frustum culling performed using original frustum (the same as one used for rendering).
Yuri