Login  Register

Re: pbuffer / FBO : lost and white screen

Posted by Sven Gothel on Sep 28, 2012; 9:19am
URL: https://forum.jogamp.org/pbuffer-FBO-lost-and-white-screen-tp4026246p4026304.html

On 09/28/2012 10:19 AM, ElJojo [via jogamp] wrote:

> I succeed to make it work using the readbuffer example
> <http://jogamp.org/git/?p=jogl-demos.git;a=tree;f=src/demos/readbuffer;hb=9c637746e8061781d6002bb279193619857cda85>
> Thanks Sven.
>
> Also, I correct a stupid error : I forgot to put a gltranslate at the
> beginning to see the scene !?!
>
> As I read, future is FBO. My code actually work using a
> glwindow.setbuffer(true) !
> Is there another "better" way to do a render-to-texture/file ?
The FBO/offscreen examples (unit tests) render to FBO/texture, yes.
Using glReadPixels as shown in the unit tests works for all platforms,
however .. you may optimize it via PBO and using double buffering (at least).
I.e. if you want to stream some rendering to file, I would use 2-3 FBOs
w/ PBO (dma transfer) if available.

This has been discussed here for a while ..

~Sven


signature.asc (907 bytes) Download Attachment