glRenderMode(GL_SELECT) and Display Lists

Hi All,

We are experiencing a performances drop when drawing a model using glCallList() and glRenderMode(GL_SELECT)

The slow code is:

gl.SelectBuffer(selectionBufferSize, selectionBuffer);

gl.RenderMode(gl.SELECT);

gl.MatrixMode(gl.PROJECTION);
gl.LoadIdentity();
...
gl.MatrixMode(gl.MODELVIEW);
gl.LoadIdentity();
...

DrawSelectableEntities();

int hits = gl.RenderMode(gl.RENDER);

If we remove the gl.RenderMode(gl.SELECT) call the code is 100 times faster as it should.

Any idea of the reason?

Thanks,

Alberto

Selection-mode is rendered in software, ever since. If you need to select from a set of many objects, you should do your own raycasting.

Jan.

Hi Jan,

We discovered that even removing display lists the result does not change.

I don’t think that such a slow down can be imputed to software rendering.

We will investigate further.

Thanks again,

Alberto

You do know, what “software rendering” means, do you? No hardware-acceleration, at all, that is. You can expect a 100x slow-down, depending on what exactly you render.

Tell me, how your investigation turns out.

Jan.

Do a search on picking and selection on the forum and you’ll find that topic discussed multiple times.
The most frequent answer is to do a raycast inside the application instead, the second would be an ID picking algorithm based on the color information.

There is actually nothing “rendered” in selection or feedback mode, but all transformations are done on the CPU. Depending on the number of vertices and (even worse!) vertex programs running you just experienced what dedicated HW is able to do compared to pure CPU calculations.

Please do some more research. The last three questions from your account on the advanced forum were beginner’s level. That gives a bad impression for the product you link to in your profile.

Originally posted by Relic:
The last three questions from your account on the advanced forum were beginner’s level. That gives a bad impression for the product you link to in your profile.
Indeed :slight_smile:

amazing what sales a pretty website can generate, even if the software is trash.
“Powerful like a CAD, easy like a .net control”.
Is that powerful with the ability to select objects or without?