diff --git a/index.html b/index.html index 1e27da9..221bbd3 100644 --- a/index.html +++ b/index.html @@ -11,8 +11,10 @@ diff --git a/webgl.js b/webgl.js index ab3e59c..180cae6 100644 --- a/webgl.js +++ b/webgl.js @@ -60,6 +60,15 @@ function main() { ]; program = buildShaderProgram(shaderSet); + + var a_Position = gl.getAttribLocation(program, 'a_Position'); + if (a_Position < 0) { + console.log('couldnt get position'); + return; + } + + gl.vertexAttrib3f(a_Position, 0.0, 0.5, 0.0); + gl.useProgram(program); gl.clearColor(0.5, 0.0, 0.0, 1.0);