Package com.banuba.sdk.internal.gl
Class GLFramePixelBufferRenderer
- java.lang.Object
-
- com.banuba.sdk.internal.gl.GLFrameSurfaceHandler
-
- com.banuba.sdk.internal.gl.GLFramePixelBufferRenderer
-
- All Implemented Interfaces:
IOrientable
,java.io.Closeable
,java.lang.AutoCloseable
public class GLFramePixelBufferRenderer extends GLFrameSurfaceHandler
Helps draw a FramePixelBuffer with any format. IMPORTANT: For this class to work, you need to initialize OpenGL, create a context, create an instance of this class in the OpenGL context. And before calling the draw(...) function, you need to initialize the viewport. And after drawing, you need to call swapBuffers() your surface.
-
-
Field Summary
-
Fields inherited from class com.banuba.sdk.internal.gl.GLFrameSurfaceHandler
SIMPLE_VERTEX_SHADER_PROGRAM
-
-
Constructor Summary
Constructors Constructor Description GLFramePixelBufferRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
draw(FramePixelBuffer pb)
Draw a FramePixelBuffer to user defined viewport-
Methods inherited from class com.banuba.sdk.internal.gl.GLFrameSurfaceHandler
drawSurface, setOrientation
-
-
-
-
Method Detail
-
draw
public void draw(FramePixelBuffer pb)
Draw a FramePixelBuffer to user defined viewport
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classGLFrameSurfaceHandler
-
-