Sign in to follow this  
c-mos

openg gl selection , problem with fullscreen quad

Recommended Posts

Hello, in my app i use glRenderMode and gluPickMatrix for selection objects. That works fine so far. But when I render my scene into a texture and draw a full screenquad where i render the texture then the picking doesnt work any longer. I draw intot he texture because of some shader effects. So the final is drawn on a fullscreen quad. Is there something i can do to solve this problem ? best regards, c-mos

Share this post


Link to post
Share on other sites
You don't need to do shading when selecting.
So when selecting, draw everything, just like you did when not using shaders (do not render to texture), otherwise, use the shader.
Do you need the selection to work all the time, or just when an event (for example keypress) occurs?

Share this post


Link to post
Share on other sites
Hi,
actually I need selection online by event. For example when i click
at a plane that i'd like to move. so i should fetch the mouse butto event.
when clicking i render without textures and without any shaders.

but what, if i want to hold down i.e the left mouse button and move the mouse
to move an object.

regards,
c-mos

Share this post


Link to post
Share on other sites
If you want to move the object, you don't have to use selection, because you know, what the selected object is. So you could do what I said.
Or if you want to get the selection work all the time:
render for selection, than render again for shading.
Selection does not draw, so I don't really understand your problem, try to specify it better with some code, or pseudocode.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this