Class GLFrameSurfaceHandler

java.lang.Object
com.banuba.sdk.internal.gl.GLFrameSurfaceHandler
All Implemented Interfaces:
IOrientable, Closeable, AutoCloseable
Direct Known Subclasses:
GLFramePixelBufferRenderer, GLOrientableTextureReader

public class GLFrameSurfaceHandler extends Object implements 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 Details

    • SIMPLE_VERTEX_SHADER_PROGRAM

      public static final String SIMPLE_VERTEX_SHADER_PROGRAM
      The fragment shader must contain an input texture coordinate variable: "in vec2 vTexCoord;"
      See Also:
  • Constructor Details

    • GLFrameSurfaceHandler

      public GLFrameSurfaceHandler()
  • Method Details

    • setOrientation

      @CallSuper public void setOrientation(Orientation orientation, boolean mirroring)
      Specified by:
      setOrientation in interface IOrientable
    • drawSurface

      @CallSuper public void drawSurface()
    • close

      @CallSuper public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable