Interface IDhApiShaderProgram

All Superinterfaces:
IBindable, IDhApiOverrideable

public interface IDhApiShaderProgram extends IDhApiOverrideable
Since:
API 2.0.0
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Runs any necessary binding this program needs so rendering can be done.
    void
    Binds the given Vertex Buffer Object to this shader program for rendering.
    void
    sets up the necessary uniforms for rendering
    void
    Free any OpenGL objects owned by this program.
    int
     
    boolean
    If this method is called that means this program has the highest priority as defined by IDhApiOverrideable.getPriority() and gets to decide if it wants to be used to render this frame or not.
    void
    sets the vec3 that all DH verticies should be offset by when rendering
    void
    Runs any necessary unbinding this program needs so rendering can be done by another program.

    Methods inherited from interface com.seibel.distanthorizons.coreapi.interfaces.dependencyInjection.IBindable

    finishDelayedSetup, getDelayedSetupComplete

    Methods inherited from interface com.seibel.distanthorizons.api.interfaces.override.IDhApiOverrideable

    getPriority
  • Method Details

    • overrideThisFrame

      boolean overrideThisFrame()
      If this method is called that means this program has the highest priority as defined by IDhApiOverrideable.getPriority() and gets to decide if it wants to be used to render this frame or not.

      If this method returns true then this program will be used for this frame.
      If this returns false then the default DH IDhApiShaderProgram will be used instead.
    • getId

      int getId()
      Returns:
      the OpenGL ID for this shader program
    • free

      void free()
      Free any OpenGL objects owned by this program.
    • bind

      void bind()
      Runs any necessary binding this program needs so rendering can be done.
    • unbind

      void unbind()
      Runs any necessary unbinding this program needs so rendering can be done by another program.
    • fillUniformData

      void fillUniformData(DhApiRenderParam renderParameters)
      sets up the necessary uniforms for rendering
    • setModelOffsetPos

      void setModelOffsetPos(DhApiVec3f modelPos)
      sets the vec3 that all DH verticies should be offset by when rendering
    • bindVertexBuffer

      void bindVertexBuffer(int vbo)
      Binds the given Vertex Buffer Object to this shader program for rendering.