@@ -70,10 +70,10 @@ SpriteBatch.prototype = {
7070 this . vertexBufferObject = vertexBufferObject ;
7171 this . viewMatrixLocation = viewMatrixLocation ;
7272
73- vertexBufferObject . addAttribute ( 0 , 2 , gl . FLOAT , false , CONST . VERTEX_SIZE , 0 ) ;
74- vertexBufferObject . addAttribute ( 1 , 2 , gl . FLOAT , false , CONST . VERTEX_SIZE , 8 ) ;
75- vertexBufferObject . addAttribute ( 2 , 3 , gl . UNSIGNED_BYTE , true , CONST . VERTEX_SIZE , 16 ) ;
76- vertexBufferObject . addAttribute ( 3 , 1 , gl . FLOAT , false , CONST . VERTEX_SIZE , 20 ) ;
73+ vertexBufferObject . addAttribute ( shader . getAttribLocation ( 'a_position' ) , 2 , gl . FLOAT , false , CONST . VERTEX_SIZE , 0 ) ;
74+ vertexBufferObject . addAttribute ( shader . getAttribLocation ( 'a_tex_coord' ) , 2 , gl . FLOAT , false , CONST . VERTEX_SIZE , 8 ) ;
75+ vertexBufferObject . addAttribute ( shader . getAttribLocation ( 'a_color' ) , 3 , gl . UNSIGNED_BYTE , true , CONST . VERTEX_SIZE , 16 ) ;
76+ vertexBufferObject . addAttribute ( shader . getAttribLocation ( 'a_alpha' ) , 1 , gl . FLOAT , false , CONST . VERTEX_SIZE , 20 ) ;
7777
7878 // Populate the index buffer only once
7979 for ( var indexA = 0 , indexB = 0 ; indexA < max ; indexA += CONST . SPRITE_INDEX_COUNT , indexB += CONST . SPRITE_VERTEX_COUNT )
0 commit comments