@@ -55,10 +55,10 @@ function main() {
55
55
56
56
// Here's where we call the routine that builds all the
57
57
// objects we'll be drawing.
58
- const buffers = initBuffers ( gl ) ;
58
+ initBuffers ( gl ) ;
59
59
60
60
// Draw the scene
61
- drawScene ( gl , programInfo , buffers ) ;
61
+ drawScene ( gl , programInfo ) ;
62
62
}
63
63
64
64
//
@@ -94,16 +94,12 @@ function initBuffers(gl) {
94
94
gl . bufferData ( gl . ARRAY_BUFFER ,
95
95
new Float32Array ( positions ) ,
96
96
gl . STATIC_DRAW ) ;
97
-
98
- return {
99
- position : positionBuffer ,
100
- } ;
101
97
}
102
98
103
99
//
104
100
// Draw the scene.
105
101
//
106
- function drawScene ( gl , programInfo , buffers ) {
102
+ function drawScene ( gl , programInfo ) {
107
103
gl . clearColor ( 0.0 , 0.0 , 0.0 , 1.0 ) ; // Clear to black, fully opaque
108
104
gl . clearDepth ( 1.0 ) ; // Clear everything
109
105
gl . enable ( gl . DEPTH_TEST ) ; // Enable depth testing
@@ -153,7 +149,6 @@ function drawScene(gl, programInfo, buffers) {
153
149
const normalize = false ;
154
150
const stride = 0 ;
155
151
const offset = 0 ;
156
- gl . bindBuffer ( gl . ARRAY_BUFFER , buffers . position ) ;
157
152
gl . vertexAttribPointer (
158
153
programInfo . attribLocations . vertexPosition ,
159
154
numComponents ,
0 commit comments