Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

GL_SELECT alternative?

20 views
Skip to first unread message

pro-grammer

unread,
Dec 10, 2009, 9:51:28 AM12/10/09
to
Ok I think this is an old problem, but I havent found a clear
explanation of the solution yet.

Use of GL_SELECT stinks on ATI cards. So whats the "modern"
alternate?

I'm drawing a bunch of animating textures(quads) in a row tilted over
the Y-axis, so I am using perspective,depth etc. I need to know which
texture is under the mouse pointer at any moment.

If the solution is too long, at least give me a link to an article or
tutorial that may help me.

Thanks in advance!

fungus

unread,
Dec 10, 2009, 1:49:17 PM12/10/09
to
On Dec 10, 3:51 pm, pro-grammer <akhil.malho...@gmail.com> wrote:
> Ok I think this is an old problem, but I havent found a clear
> explanation of the solution yet.
>
> Use of GL_SELECT stinks on ATI cards. So whats the "modern"
> alternate?
>

There is no alternative in OpenGL, it's a rendering
API not a 3D math API.

If GL_SELECT doesn't work then you have to do the
calculation yourself. Get a ray through the mouse
(use gluUnproject with z=0 and z=1 to get the ends
of the ray) and use a ray-triangle intersection
function (google for it).


--
<\___/>
/ O O \
\_____/ FTB.

http://www.topaz3d.com/ - New 3D editor for real time simulation

jbwest

unread,
Dec 10, 2009, 9:11:42 PM12/10/09
to

"fungus" <opengl...@artlum.com> wrote in message
news:28ea8bf3-8fab-4a92...@9g2000yqa.googlegroups.com...


====

Yeah, that;s the answer -- but first, make sure that you simplify the scene
as much as possible. Don't load any textures or normals or colors. Use the
simplest "proxy" geometry that you can. You should be able to get real-time
cursor readouts doing it that way. make sure that you are using the correct
picking matrix to limit the view frustum.

jbw


0 new messages