public class SimpleShaderProgram extends ShaderProgram
colorDataSize, colorStrideBytes, positionDataSize, positionStrideBytes, shaderProgramHandle| Constructor and Description |
|---|
SimpleShaderProgram(OpenGLShader vertexShader,
OpenGLShader fragmentShader) |
| 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.
|
getShaderProgramHandle, render, render, setModelViewMatrix, setProjectionMatrix, setupShaderUsagepublic SimpleShaderProgram(OpenGLShader vertexShader, OpenGLShader fragmentShader)
protected void bindAttributes()
bindAttributes in class ShaderProgrampublic int getProjectionMatrixHandle()
getProjectionMatrixHandle in class ShaderProgrampublic int getModelViewMatrixHandle()
getModelViewMatrixHandle in class ShaderProgrampublic int getPositionHandle()
public void render(java.nio.FloatBuffer vertexBuffer,
java.nio.FloatBuffer colorBuffer,
java.nio.ByteBuffer indexBuffer)
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.render in class ShaderProgramvertexBuffer - Contains the position information as two vertexes. Start and end of the line to drawcolorBuffer - Contains the color of the lineindexBuffer - TODO