org.artoolkitx.arx.arxj.rendering.shader_impl

## Class SimpleShaderProgram

- java.lang.Object
- - org.artoolkitx.arx.arxj.rendering.ShaderProgram
  - - org.artoolkitx.arx.arxj.rendering.shader_impl.SimpleShaderProgram

-     public class SimpleShaderProgram
      extends ShaderProgram

  The shader program links together the vertex shader and the fragment shader and compiles them. It also is responsible for binding the attributes. Attributes can be used to pass in values to the shader during runtime.
  Finally it renders the given geometry.

- - ### Field Summary

    - ### Fields inherited from class org.artoolkitx.arx.arxj.rendering.ShaderProgram

      `colorDataSize, colorStrideBytes, positionDataSize, positionStrideBytes, shaderProgramHandle`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SimpleShaderProgram(OpenGLShader vertexShader, OpenGLShader fragmentShader)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `bindAttributes()`
    `int` | `getModelViewMatrixHandle()`
    `int` | `getPositionHandle()`
    `int` | `getProjectionMatrixHandle()`
    `void` | `render(java.nio.FloatBuffer vertexBuffer, java.nio.FloatBuffer colorBuffer, java.nio.ByteBuffer indexBuffer)` There are several render methods available from the base class.

    - ### Methods inherited from class org.artoolkitx.arx.arxj.rendering.ShaderProgram

      `getShaderProgramHandle, render, render, setModelViewMatrix, setProjectionMatrix, setupShaderUsage`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SimpleShaderProgram

          public SimpleShaderProgram(OpenGLShader vertexShader,
                                     OpenGLShader fragmentShader)

  - ### Method Detail

    - #### bindAttributes

          protected void bindAttributes()

      Specified by:
        `bindAttributes` in class `ShaderProgram`

    - #### getProjectionMatrixHandle

          public int getProjectionMatrixHandle()

      Specified by:
        `getProjectionMatrixHandle` in class `ShaderProgram`

    - #### getModelViewMatrixHandle

          public int getModelViewMatrixHandle()

      Specified by:
        `getModelViewMatrixHandle` in class `ShaderProgram`

    - #### getPositionHandle

          public int getPositionHandle()

    - #### render

          public void render(java.nio.FloatBuffer vertexBuffer,
                             java.nio.FloatBuffer colorBuffer,
                             java.nio.ByteBuffer indexBuffer)

      There are several render methods available from the base class. In this case we override the `ShaderProgram.render(FloatBuffer, FloatBuffer, ByteBuffer)` one. Although we never use the index ByteBuffer. We pass in the vertex and color information from the `org.artoolkit.arx.arxj.rendering.shader_impl.Line` object.
      Overrides:
        `render` in class `ShaderProgram`
      Parameters:
        `vertexBuffer` - Contains the position information as two vertexes. Start and end of the line to draw
        `colorBuffer` - Contains the color of the line
        `indexBuffer` - TODO