Class GlyphRendererGL2

    • Constructor Detail

    • Method Detail

      • getUseVertexArrays

        public boolean getUseVertexArrays()
        Description copied from interface: GlyphRenderer
        Checks if this GlyphRenderer is using vertex arrays.
        Returns:
        True if this renderer is using vertex arrays
      • setUseVertexArrays

        public void setUseVertexArrays​(boolean useVertexArrays)
        Description copied from interface: GlyphRenderer
        Changes whether vertex arrays are in use.
        Parameters:
        useVertexArrays - true to use vertex arrays
      • beginRendering

        public final void beginRendering​(com.jogamp.opengl.GL gl,
                                         boolean ortho,
                                         int width,
                                         int height,
                                         boolean disableDepthTest)
        Description copied from interface: GlyphRenderer
        Starts a render cycle with this GlyphRenderer.
        Specified by:
        beginRendering in interface GlyphRenderer
        Parameters:
        gl - Current OpenGL context
        ortho - True if using orthographic projection
        width - Width of current OpenGL viewport
        height - Height of current OpenGL viewport
        disableDepthTest - True if should ignore depth values
      • dispose

        public final void dispose​(com.jogamp.opengl.GL gl)
        Description copied from interface: GlyphRenderer
        Frees resources used by this GlyphRenderer.
        Specified by:
        dispose in interface GlyphRenderer
        Parameters:
        gl - Current OpenGL context
      • drawGlyph

        public final float drawGlyph​(com.jogamp.opengl.GL gl,
                                     Glyph glyph,
                                     float x,
                                     float y,
                                     float z,
                                     float scale,
                                     com.jogamp.opengl.util.texture.TextureCoords coords)
        Description copied from interface: GlyphRenderer
        Draws a glyph with this GlyphRenderer.
        Specified by:
        drawGlyph in interface GlyphRenderer
        Parameters:
        gl - Current OpenGL context
        glyph - Visual representation of a character
        x - Position to draw on X axis, which may be negative
        y - Position to draw on Y axis, which may be negative
        z - Position to draw on Z axis, which may be negative
        scale - Relative size of glyph, which may be negative
        coords - Texture coordinates of glyph
        Returns:
        Distance to next character, which may be negative
      • endRendering

        public final void endRendering​(com.jogamp.opengl.GL gl)
        Description copied from interface: GlyphRenderer
        Finishes a render cycle with this GlyphRenderer.
        Specified by:
        endRendering in interface GlyphRenderer
        Parameters:
        gl - Current OpenGL context
      • flush

        public final void flush​(com.jogamp.opengl.GL gl)
        Description copied from interface: GlyphRenderer
        Forces all stored text to be rendered.
        Specified by:
        flush in interface GlyphRenderer
        Parameters:
        gl - Current OpenGL context
      • setColor

        public final void setColor​(float r,
                                   float g,
                                   float b,
                                   float a)
        Description copied from interface: GlyphRenderer
        Changes the color used to draw the text.
        Specified by:
        setColor in interface GlyphRenderer
        Parameters:
        r - Red component of color
        g - Green component of color
        b - Blue component of color
        a - Alpha component of color
      • setTransform

        public final void setTransform​(float[] value,
                                       boolean transpose)
        Description copied from interface: GlyphRenderer
        Changes the transformation matrix for drawing in 3D.
        Specified by:
        setTransform in interface GlyphRenderer
        Parameters:
        value - Matrix as float array
        transpose - True if array is in in row-major order