java.lang.Object
dev.engine_room.flywheel.backend.gl.GlObject
dev.engine_room.flywheel.backend.gl.shader.GlProgram

public class GlProgram extends GlObject
  • Constructor Details

    • GlProgram

      public GlProgram(int handle)
  • Method Details

    • bind

      public void bind()
    • unbind

      public static void unbind()
    • setFloat

      public void setFloat(String glslName, float value)
    • setVec2

      public void setVec2(String glslName, float x, float y)
    • setVec3

      public void setVec3(String glslName, float x, float y, float z)
    • setVec4

      public void setVec4(String glslName, float x, float y, float z, float w)
    • setMat4

      public void setMat4(String glslName, org.joml.Matrix4fc matrix)
    • setMat3

      public void setMat3(String glslName, org.joml.Matrix3fc matrix)
    • setBool

      public void setBool(String glslName, boolean bool)
    • setUInt

      public void setUInt(String glslName, int value)
    • setUVec2

      public void setUVec2(String name, int x, int y)
    • setInt

      public void setInt(String glslName, int value)
    • getUniformLocation

      public int getUniformLocation(String uniform)
      Retrieves the index of the uniform with the given name.
      Parameters:
      uniform - The name of the uniform to find the index of
      Returns:
      The uniform's index
    • setSamplerBinding

      public void setSamplerBinding(String name, GlTextureUnit binding)
      Binds a sampler uniform to the given texture unit.
      Parameters:
      name - The name of the sampler uniform.
      binding - The index of the texture unit.
    • setSamplerBinding

      public void setSamplerBinding(String name, int binding)
    • setUniformBlockBinding

      public void setUniformBlockBinding(String name, int binding)
    • bindAttribLocation

      public void bindAttribLocation(String attribute, int binding)
    • deleteInternal

      protected void deleteInternal(int handle)
      Specified by:
      deleteInternal in class GlObject