Package com.banuba.sdk.internal.gl
Class GLFrameSurfaceHandler
- java.lang.Object
-
- com.banuba.sdk.internal.gl.GLFrameSurfaceHandler
-
- All Implemented Interfaces:
IOrientable
,java.io.Closeable
,java.lang.AutoCloseable
- Direct Known Subclasses:
GLFramePixelBufferRenderer
,GLOrientableTextureReader
public class GLFrameSurfaceHandler extends java.lang.Object implements java.io.Closeable, IOrientable
Rectangular drawing plane. Responsible for creating the geometry of the square to draw and for drawing that square with the texture applied. The texture will be rendered with the specific rotation and mirroring. IMPORTANT: The shader program (vertex shader) that will use this class must start with: "#version 300 es" "layout (location = 0) in vec3 aPosition;" "layout (location = 1) in vec2 aTextureCoord;" Or you can use a SIMPLE_VERTEX_SHADER_PROGRAM which is designed to work in conjunction with this class.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
SIMPLE_VERTEX_SHADER_PROGRAM
The fragment shader must contain an input texture coordinate variable: "in vec2 vTexCoord;"
-
Constructor Summary
Constructors Constructor Description GLFrameSurfaceHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
drawSurface()
void
setOrientation(Orientation orientation, boolean mirroring)
-
-
-
Field Detail
-
SIMPLE_VERTEX_SHADER_PROGRAM
public static final java.lang.String SIMPLE_VERTEX_SHADER_PROGRAM
The fragment shader must contain an input texture coordinate variable: "in vec2 vTexCoord;"- See Also:
- Constant Field Values
-
-
Method Detail
-
setOrientation
@CallSuper public void setOrientation(Orientation orientation, boolean mirroring)
- Specified by:
setOrientation
in interfaceIOrientable
-
drawSurface
@CallSuper public void drawSurface()
-
close
@CallSuper public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
-
-