Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

name refactoring

  • Loading branch information...
commit ad4cd6a9370e3b530011c67ea44faf5dd85be026 1 parent f8f0e37
@alihelmy authored
View
8 LessonThree/com/onehandstand/lwjgltutorial/lessonthree/ShaderTriangle.java
@@ -29,7 +29,7 @@
private int vertexPositionsBuffer, vertexIndicesBuffer, vertexColoursBuffer;
private int vertexPositionsBufferSize, vertexIndicesBufferSize, vertexColoursBufferSize;
private final int numVertices=3, numAxisPerVertex=2, numColoursPerVertex=3;
- private int vColorAttributeIndex, coord2dAttributeIndex;
+ private int vColorAttributeIndex, coord2DAttributeIndex;
private final int bytesPerFloat=Float.SIZE/8, bytesPerInt=Integer.SIZE/8;
public ShaderTriangle() {
@@ -44,7 +44,7 @@ public ShaderTriangle() {
private void initShaderAttributes() {
String coord2dAttributeName="coord2D";
- coord2dAttributeIndex=glGetAttribLocation(shaderProgram, coord2dAttributeName);
+ coord2DAttributeIndex=glGetAttribLocation(shaderProgram, coord2dAttributeName);
String vColorAttributeName="vColor";
vColorAttributeIndex=glGetAttribLocation(shaderProgram, vColorAttributeName);
}
@@ -143,8 +143,8 @@ public void draw() {
//bind vertex array
glBindBufferARB(GL_ARRAY_BUFFER_ARB, vertexPositionsBuffer);
//pass in coords info to vertex shader
- glEnableVertexAttribArray(coord2dAttributeIndex);
- glVertexAttribPointer(coord2dAttributeIndex, numAxisPerVertex, GL_FLOAT, false, 0, 0);
+ glEnableVertexAttribArray(coord2DAttributeIndex);
+ glVertexAttribPointer(coord2DAttributeIndex, numAxisPerVertex, GL_FLOAT, false, 0, 0);
//bind the colour attribute
glEnableVertexAttribArray(vColorAttributeIndex);
Please sign in to comment.
Something went wrong with that request. Please try again.