Class TessellationShaderProgram

java.lang.Object
gaiasky.util.gdx.shader.ExtShaderProgram
gaiasky.util.gdx.shader.TessellationShaderProgram
All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable

public class TessellationShaderProgram
extends ExtShaderProgram
  • Field Summary

    Fields
    Modifier and Type Field Description
    static java.lang.String BINORMAL_ATTRIBUTE
    default name for binormal attribute
    static java.lang.String BONEWEIGHT_ATTRIBUTE
    default name for boneweight attribute
    static java.lang.String COLOR_ATTRIBUTE
    default name for color attributes
    static java.lang.String NORMAL_ATTRIBUTE
    default name for normal attributes
    static boolean pedantic
    flag indicating whether attributes & uniforms must be present at all times
    static java.lang.String POSITION_ATTRIBUTE
    default name for position attributes
    static java.lang.String prependFragmentCode
    code that is always added to every fragment shader code, typically used to inject a #version line.
    static java.lang.String prependTessControlCode  
    static java.lang.String prependTessEvaluationCode  
    static java.lang.String prependVertexCode
    code that is always added to the vertex shader code, typically used to inject a #version line.
    static java.lang.String TANGENT_ATTRIBUTE
    default name for tangent attribute
    static java.lang.String TEXCOORD_ATTRIBUTE
    default name for texcoords attributes, append texture unit number
  • Constructor Summary

    Constructors
    Constructor Description
    TessellationShaderProgram​(java.lang.String vertexShader, java.lang.String tessellationControlShader, java.lang.String tessellationEvaluationShader, java.lang.String fragmentShader)  
  • Method Summary

    Modifier and Type Method Description
    void begin()
    Makes OpenGL ES 2.0 use this vertex and fragment shader pair.
    static void clearAllShaderPrograms​(com.badlogic.gdx.Application app)  
    protected int createProgram()  
    void disableVertexAttribute​(int location)  
    void disableVertexAttribute​(java.lang.String name)
    Disables the vertex attribute with the given name
    void dispose()
    Disposes all resources associated with this shader.
    void enableVertexAttribute​(int location)  
    void enableVertexAttribute​(java.lang.String name)
    Enables the vertex attribute with the given name
    void end()
    Disables this shader.
    int fetchUniformLocation​(java.lang.String name, boolean pedantic)  
    int getAttributeLocation​(java.lang.String name)  
    java.lang.String[] getAttributes()  
    int getAttributeSize​(java.lang.String name)  
    int getAttributeType​(java.lang.String name)  
    java.lang.String getFragmentShaderSource()  
    java.lang.String getLog()  
    static java.lang.String getManagedStatus()  
    static int getNumManagedShaderPrograms()  
    int getUniformLocation​(java.lang.String name)  
    java.lang.String[] getUniforms()  
    int getUniformSize​(java.lang.String name)  
    int getUniformType​(java.lang.String name)  
    java.lang.String getVertexShaderSource()  
    boolean hasAttribute​(java.lang.String name)  
    boolean hasUniform​(java.lang.String name)  
    static void invalidateAllShaderPrograms​(com.badlogic.gdx.Application app)
    Invalidates all shaders so the next time they are used new handles are generated
    boolean isCompiled()  
    void setAttributef​(java.lang.String name, float value1, float value2, float value3, float value4)
    Sets the given attribute
    void setUniform1fv​(int location, float[] values, int offset, int length)  
    void setUniform1fv​(java.lang.String name, float[] values, int offset, int length)  
    void setUniform2fv​(int location, float[] values, int offset, int length)  
    void setUniform2fv​(java.lang.String name, float[] values, int offset, int length)  
    void setUniform3fv​(int location, float[] values, int offset, int length)  
    void setUniform3fv​(java.lang.String name, float[] values, int offset, int length)  
    void setUniform4fv​(int location, float[] values, int offset, int length)  
    void setUniform4fv​(java.lang.String name, float[] values, int offset, int length)  
    void setUniformf​(int location, float value)  
    void setUniformf​(int location, float value1, float value2)  
    void setUniformf​(int location, float value1, float value2, float value3)  
    void setUniformf​(int location, float value1, float value2, float value3, float value4)  
    void setUniformf​(int location, com.badlogic.gdx.graphics.Color values)  
    void setUniformf​(int location, com.badlogic.gdx.math.Vector2 values)  
    void setUniformf​(int location, com.badlogic.gdx.math.Vector3 values)  
    void setUniformf​(java.lang.String name, float value)
    Sets the uniform with the given name.
    void setUniformf​(java.lang.String name, float value1, float value2)
    Sets the uniform with the given name.
    void setUniformf​(java.lang.String name, float value1, float value2, float value3)
    Sets the uniform with the given name.
    void setUniformf​(java.lang.String name, float value1, float value2, float value3, float value4)
    Sets the uniform with the given name.
    void setUniformf​(java.lang.String name, com.badlogic.gdx.graphics.Color values)
    Sets the uniform with the given name.
    void setUniformf​(java.lang.String name, com.badlogic.gdx.math.Vector2 values)
    Sets the uniform with the given name.
    void setUniformf​(java.lang.String name, com.badlogic.gdx.math.Vector3 values)
    Sets the uniform with the given name.
    void setUniformi​(int location, int value)  
    void setUniformi​(int location, int value1, int value2)  
    void setUniformi​(int location, int value1, int value2, int value3)  
    void setUniformi​(int location, int value1, int value2, int value3, int value4)  
    void setUniformi​(java.lang.String name, int value)
    Sets the uniform with the given name.
    void setUniformi​(java.lang.String name, int value1, int value2)
    Sets the uniform with the given name.
    void setUniformi​(java.lang.String name, int value1, int value2, int value3)
    Sets the uniform with the given name.
    void setUniformi​(java.lang.String name, int value1, int value2, int value3, int value4)
    Sets the uniform with the given name.
    void setUniformMatrix​(int location, com.badlogic.gdx.math.Matrix3 matrix)  
    void setUniformMatrix​(int location, com.badlogic.gdx.math.Matrix3 matrix, boolean transpose)  
    void setUniformMatrix​(int location, com.badlogic.gdx.math.Matrix4 matrix)  
    void setUniformMatrix​(int location, com.badlogic.gdx.math.Matrix4 matrix, boolean transpose)  
    void setUniformMatrix​(java.lang.String name, com.badlogic.gdx.math.Matrix3 matrix)
    Sets the uniform matrix with the given name.
    void setUniformMatrix​(java.lang.String name, com.badlogic.gdx.math.Matrix3 matrix, boolean transpose)
    Sets the uniform matrix with the given name.
    void setUniformMatrix​(java.lang.String name, com.badlogic.gdx.math.Matrix4 matrix)
    Sets the uniform matrix with the given name.
    void setUniformMatrix​(java.lang.String name, com.badlogic.gdx.math.Matrix4 matrix, boolean transpose)
    Sets the uniform matrix with the given name.
    void setUniformMatrix3fv​(java.lang.String name, java.nio.FloatBuffer buffer, int count, boolean transpose)
    Sets an array of uniform matrices with the given name.
    void setUniformMatrix4fv​(int location, float[] values, int offset, int length)  
    void setUniformMatrix4fv​(java.lang.String name, float[] values, int offset, int length)  
    void setUniformMatrix4fv​(java.lang.String name, java.nio.FloatBuffer buffer, int count, boolean transpose)
    Sets an array of uniform matrices with the given name.
    void setVertexAttribute​(int location, int size, int type, boolean normalize, int stride, int offset)  
    void setVertexAttribute​(int location, int size, int type, boolean normalize, int stride, java.nio.Buffer buffer)  
    void setVertexAttribute​(java.lang.String name, int size, int type, boolean normalize, int stride, int offset)
    Sets the vertex attribute with the given name.
    void setVertexAttribute​(java.lang.String name, int size, int type, boolean normalize, int stride, java.nio.Buffer buffer)
    Sets the vertex attribute with the given name.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • POSITION_ATTRIBUTE

      public static final java.lang.String POSITION_ATTRIBUTE
      default name for position attributes
      See Also:
      Constant Field Values
    • NORMAL_ATTRIBUTE

      public static final java.lang.String NORMAL_ATTRIBUTE
      default name for normal attributes
      See Also:
      Constant Field Values
    • COLOR_ATTRIBUTE

      public static final java.lang.String COLOR_ATTRIBUTE
      default name for color attributes
      See Also:
      Constant Field Values
    • TEXCOORD_ATTRIBUTE

      public static final java.lang.String TEXCOORD_ATTRIBUTE
      default name for texcoords attributes, append texture unit number
      See Also:
      Constant Field Values
    • TANGENT_ATTRIBUTE

      public static final java.lang.String TANGENT_ATTRIBUTE
      default name for tangent attribute
      See Also:
      Constant Field Values
    • BINORMAL_ATTRIBUTE

      public static final java.lang.String BINORMAL_ATTRIBUTE
      default name for binormal attribute
      See Also:
      Constant Field Values
    • BONEWEIGHT_ATTRIBUTE

      public static final java.lang.String BONEWEIGHT_ATTRIBUTE
      default name for boneweight attribute
      See Also:
      Constant Field Values
    • pedantic

      public static boolean pedantic
      flag indicating whether attributes & uniforms must be present at all times
    • prependVertexCode

      public static java.lang.String prependVertexCode
      code that is always added to the vertex shader code, typically used to inject a #version line. Note that this is added as-is, you should include a newline (`\n`) if needed.
    • prependTessControlCode

      public static java.lang.String prependTessControlCode
    • prependTessEvaluationCode

      public static java.lang.String prependTessEvaluationCode
    • prependFragmentCode

      public static java.lang.String prependFragmentCode
      code that is always added to every fragment shader code, typically used to inject a #version line. Note that this is added as-is, you should include a newline (`\n`) if needed.
  • Constructor Details

    • TessellationShaderProgram

      public TessellationShaderProgram​(java.lang.String vertexShader, java.lang.String tessellationControlShader, java.lang.String tessellationEvaluationShader, java.lang.String fragmentShader)
  • Method Details

    • createProgram

      protected int createProgram()
      Overrides:
      createProgram in class ExtShaderProgram
    • getLog

      public java.lang.String getLog()
      Overrides:
      getLog in class ExtShaderProgram
      Returns:
      the log info for the shader compilation and program linking stage. The shader needs to be bound for this method to have an effect.
    • isCompiled

      public boolean isCompiled()
      Overrides:
      isCompiled in class ExtShaderProgram
      Returns:
      whether this ShaderProgram compiled successfully.
    • fetchUniformLocation

      public int fetchUniformLocation​(java.lang.String name, boolean pedantic)
      Overrides:
      fetchUniformLocation in class ExtShaderProgram
    • setUniformi

      public void setUniformi​(java.lang.String name, int value)
      Sets the uniform with the given name. The ShaderProgram must be bound for this to work.
      Overrides:
      setUniformi in class ExtShaderProgram
      Parameters:
      name - the name of the uniform
      value - the value
    • setUniformi

      public void setUniformi​(int location, int value)
      Overrides:
      setUniformi in class ExtShaderProgram
    • setUniformi

      public void setUniformi​(java.lang.String name, int value1, int value2)
      Sets the uniform with the given name. The ShaderProgram must be bound for this to work.
      Overrides:
      setUniformi in class ExtShaderProgram
      Parameters:
      name - the name of the uniform
      value1 - the first value
      value2 - the second value
    • setUniformi

      public void setUniformi​(int location, int value1, int value2)
      Overrides:
      setUniformi in class ExtShaderProgram
    • setUniformi

      public void setUniformi​(java.lang.String name, int value1, int value2, int value3)
      Sets the uniform with the given name. The ShaderProgram must be bound for this to work.
      Overrides:
      setUniformi in class ExtShaderProgram
      Parameters:
      name - the name of the uniform
      value1 - the first value
      value2 - the second value
      value3 - the third value
    • setUniformi

      public void setUniformi​(int location, int value1, int value2, int value3)
      Overrides:
      setUniformi in class ExtShaderProgram
    • setUniformi

      public void setUniformi​(java.lang.String name, int value1, int value2, int value3, int value4)
      Sets the uniform with the given name. The ShaderProgram must be bound for this to work.
      Overrides:
      setUniformi in class ExtShaderProgram
      Parameters:
      name - the name of the uniform
      value1 - the first value
      value2 - the second value
      value3 - the third value
      value4 - the fourth value
    • setUniformi

      public void setUniformi​(int location, int value1, int value2, int value3, int value4)
      Overrides:
      setUniformi in class ExtShaderProgram
    • setUniformf

      public void setUniformf​(java.lang.String name, float value)
      Sets the uniform with the given name. The ShaderProgram must be bound for this to work.
      Overrides:
      setUniformf in class ExtShaderProgram
      Parameters:
      name - the name of the uniform
      value - the value
    • setUniformf

      public void setUniformf​(int location, float value)
      Overrides:
      setUniformf in class ExtShaderProgram
    • setUniformf

      public void setUniformf​(java.lang.String name, float value1, float value2)
      Sets the uniform with the given name. The ShaderProgram must be bound for this to work.
      Overrides:
      setUniformf in class ExtShaderProgram
      Parameters:
      name - the name of the uniform
      value1 - the first value
      value2 - the second value
    • setUniformf

      public void setUniformf​(int location, float value1, float value2)
      Overrides:
      setUniformf in class ExtShaderProgram
    • setUniformf

      public void setUniformf​(java.lang.String name, float value1, float value2, float value3)
      Sets the uniform with the given name. The ShaderProgram must be bound for this to work.
      Overrides:
      setUniformf in class ExtShaderProgram
      Parameters:
      name - the name of the uniform
      value1 - the first value
      value2 - the second value
      value3 - the third value
    • setUniformf

      public void setUniformf​(int location, float value1, float value2, float value3)
      Overrides:
      setUniformf in class ExtShaderProgram
    • setUniformf

      public void setUniformf​(java.lang.String name, float value1, float value2, float value3, float value4)
      Sets the uniform with the given name. The ShaderProgram must be bound for this to work.
      Overrides:
      setUniformf in class ExtShaderProgram
      Parameters:
      name - the name of the uniform
      value1 - the first value
      value2 - the second value
      value3 - the third value
      value4 - the fourth value
    • setUniformf

      public void setUniformf​(int location, float value1, float value2, float value3, float value4)
      Overrides:
      setUniformf in class ExtShaderProgram
    • setUniform1fv

      public void setUniform1fv​(java.lang.String name, float[] values, int offset, int length)
      Overrides:
      setUniform1fv in class ExtShaderProgram
    • setUniform1fv

      public void setUniform1fv​(int location, float[] values, int offset, int length)
      Overrides:
      setUniform1fv in class ExtShaderProgram
    • setUniform2fv

      public void setUniform2fv​(java.lang.String name, float[] values, int offset, int length)
      Overrides:
      setUniform2fv in class ExtShaderProgram
    • setUniform2fv

      public void setUniform2fv​(int location, float[] values, int offset, int length)
      Overrides:
      setUniform2fv in class ExtShaderProgram
    • setUniform3fv

      public void setUniform3fv​(java.lang.String name, float[] values, int offset, int length)
      Overrides:
      setUniform3fv in class ExtShaderProgram
    • setUniform3fv

      public void setUniform3fv​(int location, float[] values, int offset, int length)
      Overrides:
      setUniform3fv in class ExtShaderProgram
    • setUniform4fv

      public void setUniform4fv​(java.lang.String name, float[] values, int offset, int length)
      Overrides:
      setUniform4fv in class ExtShaderProgram
    • setUniform4fv

      public void setUniform4fv​(int location, float[] values, int offset, int length)
      Overrides:
      setUniform4fv in class ExtShaderProgram
    • setUniformMatrix

      public void setUniformMatrix​(java.lang.String name, com.badlogic.gdx.math.Matrix4 matrix)
      Sets the uniform matrix with the given name. The ShaderProgram must be bound for this to work.
      Overrides:
      setUniformMatrix in class ExtShaderProgram
      Parameters:
      name - the name of the uniform
      matrix - the matrix
    • setUniformMatrix

      public void setUniformMatrix​(java.lang.String name, com.badlogic.gdx.math.Matrix4 matrix, boolean transpose)
      Sets the uniform matrix with the given name. The ShaderProgram must be bound for this to work.
      Overrides:
      setUniformMatrix in class ExtShaderProgram
      Parameters:
      name - the name of the uniform
      matrix - the matrix
      transpose - whether the matrix should be transposed
    • setUniformMatrix

      public void setUniformMatrix​(int location, com.badlogic.gdx.math.Matrix4 matrix)
      Overrides:
      setUniformMatrix in class ExtShaderProgram
    • setUniformMatrix

      public void setUniformMatrix​(int location, com.badlogic.gdx.math.Matrix4 matrix, boolean transpose)
      Overrides:
      setUniformMatrix in class ExtShaderProgram
    • setUniformMatrix

      public void setUniformMatrix​(java.lang.String name, com.badlogic.gdx.math.Matrix3 matrix)
      Sets the uniform matrix with the given name. The ShaderProgram must be bound for this to work.
      Overrides:
      setUniformMatrix in class ExtShaderProgram
      Parameters:
      name - the name of the uniform
      matrix - the matrix
    • setUniformMatrix

      public void setUniformMatrix​(java.lang.String name, com.badlogic.gdx.math.Matrix3 matrix, boolean transpose)
      Sets the uniform matrix with the given name. The ShaderProgram must be bound for this to work.
      Overrides:
      setUniformMatrix in class ExtShaderProgram
      Parameters:
      name - the name of the uniform
      matrix - the matrix
      transpose - whether the uniform matrix should be transposed
    • setUniformMatrix

      public void setUniformMatrix​(int location, com.badlogic.gdx.math.Matrix3 matrix)
      Overrides:
      setUniformMatrix in class ExtShaderProgram
    • setUniformMatrix

      public void setUniformMatrix​(int location, com.badlogic.gdx.math.Matrix3 matrix, boolean transpose)
      Overrides:
      setUniformMatrix in class ExtShaderProgram
    • setUniformMatrix3fv

      public void setUniformMatrix3fv​(java.lang.String name, java.nio.FloatBuffer buffer, int count, boolean transpose)
      Sets an array of uniform matrices with the given name. The ShaderProgram must be bound for this to work.
      Overrides:
      setUniformMatrix3fv in class ExtShaderProgram
      Parameters:
      name - the name of the uniform
      buffer - buffer containing the matrix data
      transpose - whether the uniform matrix should be transposed
    • setUniformMatrix4fv

      public void setUniformMatrix4fv​(java.lang.String name, java.nio.FloatBuffer buffer, int count, boolean transpose)
      Sets an array of uniform matrices with the given name. The ShaderProgram must be bound for this to work.
      Overrides:
      setUniformMatrix4fv in class ExtShaderProgram
      Parameters:
      name - the name of the uniform
      buffer - buffer containing the matrix data
      transpose - whether the uniform matrix should be transposed
    • setUniformMatrix4fv

      public void setUniformMatrix4fv​(int location, float[] values, int offset, int length)
      Overrides:
      setUniformMatrix4fv in class ExtShaderProgram
    • setUniformMatrix4fv

      public void setUniformMatrix4fv​(java.lang.String name, float[] values, int offset, int length)
      Overrides:
      setUniformMatrix4fv in class ExtShaderProgram
    • setUniformf

      public void setUniformf​(java.lang.String name, com.badlogic.gdx.math.Vector2 values)
      Sets the uniform with the given name. The ShaderProgram must be bound for this to work.
      Overrides:
      setUniformf in class ExtShaderProgram
      Parameters:
      name - the name of the uniform
      values - x and y as the first and second values respectively
    • setUniformf

      public void setUniformf​(int location, com.badlogic.gdx.math.Vector2 values)
      Overrides:
      setUniformf in class ExtShaderProgram
    • setUniformf

      public void setUniformf​(java.lang.String name, com.badlogic.gdx.math.Vector3 values)
      Sets the uniform with the given name. The ShaderProgram must be bound for this to work.
      Overrides:
      setUniformf in class ExtShaderProgram
      Parameters:
      name - the name of the uniform
      values - x, y and z as the first, second and third values respectively
    • setUniformf

      public void setUniformf​(int location, com.badlogic.gdx.math.Vector3 values)
      Overrides:
      setUniformf in class ExtShaderProgram
    • setUniformf

      public void setUniformf​(java.lang.String name, com.badlogic.gdx.graphics.Color values)
      Sets the uniform with the given name. The ShaderProgram must be bound for this to work.
      Overrides:
      setUniformf in class ExtShaderProgram
      Parameters:
      name - the name of the uniform
      values - r, g, b and a as the first through fourth values respectively
    • setUniformf

      public void setUniformf​(int location, com.badlogic.gdx.graphics.Color values)
      Overrides:
      setUniformf in class ExtShaderProgram
    • setVertexAttribute

      public void setVertexAttribute​(java.lang.String name, int size, int type, boolean normalize, int stride, java.nio.Buffer buffer)
      Sets the vertex attribute with the given name. The ShaderProgram must be bound for this to work.
      Overrides:
      setVertexAttribute in class ExtShaderProgram
      Parameters:
      name - the attribute name
      size - the number of components, must be >= 1 and <= 4
      type - the type, must be one of GL20.GL_BYTE, GL20.GL_UNSIGNED_BYTE, GL20.GL_SHORT, GL20.GL_UNSIGNED_SHORT,GL20.GL_FIXED, or GL20.GL_FLOAT. GL_FIXED will not work on the desktop
      normalize - whether fixed point data should be normalized. Will not work on the desktop
      stride - the stride in bytes between successive attributes
      buffer - the buffer containing the vertex attributes.
    • setVertexAttribute

      public void setVertexAttribute​(int location, int size, int type, boolean normalize, int stride, java.nio.Buffer buffer)
      Overrides:
      setVertexAttribute in class ExtShaderProgram
    • setVertexAttribute

      public void setVertexAttribute​(java.lang.String name, int size, int type, boolean normalize, int stride, int offset)
      Sets the vertex attribute with the given name. The ShaderProgram must be bound for this to work.
      Overrides:
      setVertexAttribute in class ExtShaderProgram
      Parameters:
      name - the attribute name
      size - the number of components, must be >= 1 and <= 4
      type - the type, must be one of GL20.GL_BYTE, GL20.GL_UNSIGNED_BYTE, GL20.GL_SHORT, GL20.GL_UNSIGNED_SHORT,GL20.GL_FIXED, or GL20.GL_FLOAT. GL_FIXED will not work on the desktop
      normalize - whether fixed point data should be normalized. Will not work on the desktop
      stride - the stride in bytes between successive attributes
      offset - byte offset into the vertex buffer object bound to GL20.GL_ARRAY_BUFFER.
    • setVertexAttribute

      public void setVertexAttribute​(int location, int size, int type, boolean normalize, int stride, int offset)
      Overrides:
      setVertexAttribute in class ExtShaderProgram
    • begin

      public void begin()
      Makes OpenGL ES 2.0 use this vertex and fragment shader pair. When you are done with this shader you have to call ShaderProgram.end().
      Overrides:
      begin in class ExtShaderProgram
    • end

      public void end()
      Disables this shader. Must be called when one is done with the shader. Don't mix it with dispose, that will release the shader resources.
      Overrides:
      end in class ExtShaderProgram
    • disableVertexAttribute

      public void disableVertexAttribute​(java.lang.String name)
      Disables the vertex attribute with the given name
      Overrides:
      disableVertexAttribute in class ExtShaderProgram
      Parameters:
      name - the vertex attribute name
    • disableVertexAttribute

      public void disableVertexAttribute​(int location)
      Overrides:
      disableVertexAttribute in class ExtShaderProgram
    • enableVertexAttribute

      public void enableVertexAttribute​(java.lang.String name)
      Enables the vertex attribute with the given name
      Overrides:
      enableVertexAttribute in class ExtShaderProgram
      Parameters:
      name - the vertex attribute name
    • enableVertexAttribute

      public void enableVertexAttribute​(int location)
      Overrides:
      enableVertexAttribute in class ExtShaderProgram
    • invalidateAllShaderPrograms

      public static void invalidateAllShaderPrograms​(com.badlogic.gdx.Application app)
      Invalidates all shaders so the next time they are used new handles are generated
      Parameters:
      app -
    • clearAllShaderPrograms

      public static void clearAllShaderPrograms​(com.badlogic.gdx.Application app)
    • getManagedStatus

      public static java.lang.String getManagedStatus()
    • getNumManagedShaderPrograms

      public static int getNumManagedShaderPrograms()
      Returns:
      the number of managed shader programs currently loaded
    • setAttributef

      public void setAttributef​(java.lang.String name, float value1, float value2, float value3, float value4)
      Sets the given attribute
      Overrides:
      setAttributef in class ExtShaderProgram
      Parameters:
      name - the name of the attribute
      value1 - the first value
      value2 - the second value
      value3 - the third value
      value4 - the fourth value
    • hasAttribute

      public boolean hasAttribute​(java.lang.String name)
      Overrides:
      hasAttribute in class ExtShaderProgram
      Parameters:
      name - the name of the attribute
      Returns:
      whether the attribute is available in the shader
    • getAttributeType

      public int getAttributeType​(java.lang.String name)
      Overrides:
      getAttributeType in class ExtShaderProgram
      Parameters:
      name - the name of the attribute
      Returns:
      the type of the attribute, one of GL20.GL_FLOAT, GL20.GL_FLOAT_VEC2 etc.
    • getAttributeLocation

      public int getAttributeLocation​(java.lang.String name)
      Overrides:
      getAttributeLocation in class ExtShaderProgram
      Parameters:
      name - the name of the attribute
      Returns:
      the location of the attribute or -1.
    • getAttributeSize

      public int getAttributeSize​(java.lang.String name)
      Overrides:
      getAttributeSize in class ExtShaderProgram
      Parameters:
      name - the name of the attribute
      Returns:
      the size of the attribute or 0.
    • hasUniform

      public boolean hasUniform​(java.lang.String name)
      Overrides:
      hasUniform in class ExtShaderProgram
      Parameters:
      name - the name of the uniform
      Returns:
      whether the uniform is available in the shader
    • getUniformType

      public int getUniformType​(java.lang.String name)
      Overrides:
      getUniformType in class ExtShaderProgram
      Parameters:
      name - the name of the uniform
      Returns:
      the type of the uniform, one of GL20.GL_FLOAT, GL20.GL_FLOAT_VEC2 etc.
    • getUniformLocation

      public int getUniformLocation​(java.lang.String name)
      Overrides:
      getUniformLocation in class ExtShaderProgram
      Parameters:
      name - the name of the uniform
      Returns:
      the location of the uniform or -1.
    • getUniformSize

      public int getUniformSize​(java.lang.String name)
      Overrides:
      getUniformSize in class ExtShaderProgram
      Parameters:
      name - the name of the uniform
      Returns:
      the size of the uniform or 0.
    • getAttributes

      public java.lang.String[] getAttributes()
      Overrides:
      getAttributes in class ExtShaderProgram
      Returns:
      the attributes
    • getUniforms

      public java.lang.String[] getUniforms()
      Overrides:
      getUniforms in class ExtShaderProgram
      Returns:
      the uniforms
    • getVertexShaderSource

      public java.lang.String getVertexShaderSource()
      Overrides:
      getVertexShaderSource in class ExtShaderProgram
      Returns:
      the source of the vertex shader
    • getFragmentShaderSource

      public java.lang.String getFragmentShaderSource()
      Overrides:
      getFragmentShaderSource in class ExtShaderProgram
      Returns:
      the source of the fragment shader
    • dispose

      public void dispose()
      Description copied from class: ExtShaderProgram
      Disposes all resources associated with this shader. Must be called when the shader is no longer used.
      Specified by:
      dispose in interface com.badlogic.gdx.utils.Disposable
      Overrides:
      dispose in class ExtShaderProgram