PDA

View Full Version : GL SELECT MODE !! urgent



taurean
11-15-2003, 11:09 PM
Hello All,

I have a doubt here. I render around 500/600 triangles within gl SELECTION mode. Does this increase the time spent ?. If I render the same in RENDERING MODE and measure the time, it takes <= 1 ms. and if I do the same rendering in SELECT mode just before calling the HITS, it takes 6 ms (only the rendering piece of code). am I doing any mistake, where it would be?..I am getting a correct clipped output!!

timer is a high performance counter, don't doubt it !!

I don't know whatz happening ? please throw in ur COMMENTS....any help is appreciated.....

Thanks,

Taurean

PanzerSchreck
11-16-2003, 01:41 AM
If I need selection (like in my current game) I alwys detect in which mode the scene is rendered (GL_RENDER or GL_SELECT) and if it's GL_SELECT for selectionmode, then I just draw a very simplified version of the scene.
In my current game I usually render a huge displaced (displaced in the 3D-Modeller) mesh of the earth. But when I'm in selectionmode, I instead draw a very simplified sphere (~500 Tris), disable texturemapping and don't draw all things not necessary for selection.
So I think thats the best way when you need to use selection very often like in a mousedown-event.

taurean
11-16-2003, 03:35 AM
Originally posted by PanzerSchreck:
If I need selection (like in my current game) I alwys detect in which mode the scene is rendered (GL_RENDER or GL_SELECT) and if it's GL_SELECT for selectionmode, then I just draw a very simplified version of the scene.
In my current game I usually render a huge displaced (displaced in the 3D-Modeller) mesh of the earth. But when I'm in selectionmode, I instead draw a very simplified sphere (~500 Tris), disable texturemapping and don't draw all things not necessary for selection.
So I think thats the best way when you need to use selection very often like in a mousedown-event.

I don't get this: How do you use a simple image rather than the real image while in SELECT mode...I use SELECT MODE to clip the part of triangles that are not in intersection with the view volume specified by me. For Eg: In you case, assume your EARTH is rotating and u need to clip all the polygons of EARTH that are not in the view volume I specify facing the EARTH. In that case, how do you use a small sphere in SELECT MODE...

please EXPLAIN !!, also thanks for your reply

~Taurean

mikael_aronsson
11-16-2003, 04:09 AM
Hi !

Turn of all lighting when you select, this gives a good speedup, but everything that doesn't have any effect on the geomtry can be disabled in selection mode.

Mikael

PanzerSchreck
11-16-2003, 04:13 AM
I just said that I use a simplified Mesh when in selectmode and that I only draw what's necessary for selection.
So in my case when in selection mode I replace the high-poly mesh of earth that you normally see with a very low-poly sphere, don't draw the atmosphere around the earth, disable all unnecessary things like texturemapping (on all TMUs), lighting and I also don't draw my GUI.

This saves a lot of renderingtime when in selectionmode and I'm able to do a constant selection in my mousemove-event at a framerate that's only a few fps slower than when not selecting.