Login  Register

Re: How to access the buffer of a GLSurface?

Posted by Sven Gothel on Sep 25, 2011; 11:36am
URL: https://forum.jogamp.org/How-to-access-the-buffer-of-a-GLSurface-tp3366378p3366414.html

On Sunday, September 25, 2011 12:54:36 PM Dario [via jogamp] wrote:
>
> Is there a way to directly acces the frame buffer of a surface... and I'd
> like it to be cross platform.
>

GLReadBufferUtil
  http://jogamp.org/git/?p=jogl.git;a=blob;f=src/jogl/classes/com/jogamp/opengl/util/GLReadBufferUtil.java;hb=HEAD

A convenient utility to read the pixels our of the FB, see it's usage in the unit tests:

  http://jogamp.org/git/?p=jogl.git;a=blob;f=src/test/com/jogamp/opengl/test/junit/graph/demos/ui/UIListenerBase01.java;hb=HEAD#l88

It currently lacks of async DMA streaming via PBO,
but well .. we haven't had the video streaming use case ourselves.

Note: You cannotdirectly access the front or back buffer in OpenGL.

~Sven