Login  Register

Re: Mouse selection

Posted by Sven Gothel on Mar 02, 2012; 2:37pm
URL: https://forum.jogamp.org/Mouse-selection-tp3787468p3793636.html

On 03/02/2012 02:09 PM, elect [via jogamp] wrote:
>
>
> If we are speaking about milliseconds is totally acceptable ;)
>
> Moreover, why I need a dedicated FBO and a PBO? Couldnt I just retrieve the
> pixel depth and pass it to the gluUnProject?
>

As I mentioned, you can do this - but w/o async read access.

Synchronous read is very simple and w/o an additional FBO, as pointed
out in the link to our demo code, and others.

The pseudo code just covers the async read access using FBO/PBO.
You need an extra render target here (FBO), otherwise the result
would be overwritten by the next frame's back-buffer write operation.
Sure, you might be able to use the front buffer to read it out before swap
- sill having the 1-frame-lag allowing PBO async read to be finished.
PBO is currently the only way to issue async read.

> Do you have some link to any guide/tutorial?

We haven't tried the async PBO glReadBuffer in our code yet,
since it's not ES2 compliant. Julien has some code I assume.

However, all the given pointers here should enable you to impl. it.
If you are willing to create some selection unit test
utilizing the different techniques I will help w/ that.

~Sven


signature.asc (910 bytes) Download Attachment