@@ -1579,27 +1579,14 @@ class GlDriver extends Driver {
15791579 b .data = data ;
15801580 }
15811581
1582- // override function uploadBufferBytes( b : h3d.Buffer, startVertex : Int, vertexCount : Int, buf : haxe.io.Bytes, bufPos : Int ) {
1583- // var stride = b.format.strideBytes;
1584- // var type = b.flags.has(IndexBuffer) ? GL.ELEMENT_ARRAY_BUFFER : GL.ARRAY_BUFFER;
1585- // gl.bindBuffer(type, b.vbuf);
1586- // #if hl
1587- // gl.bufferSubData(type, startVertex * stride, streamData(buf.getData(),bufPos,vertexCount * stride), bufPos * STREAM_POS, vertexCount * stride);
1588- // #else
1589- // var sub = new Uint8Array(buf.getData(), bufPos, vertexCount * stride);
1590- // gl.bufferSubData(type, startVertex * stride, sub);
1591- // #end
1592- // gl.bindBuffer(type, null);
1593- // if( b.flags.has(IndexBuffer) ) curIndexBuffer = null;
1594- // }
1595-
15961582 override function uploadInstanceBufferBytes (b : InstanceBuffer , startVertex : Int , vertexCount : Int , buf : haxe.io. Bytes , bufPos : Int ) {
15971583 var stride = 5 * 4 ;
1598- var type = GL .DRAW_INDIRECT_BUFFER ;
15991584 #if hl
1585+ var type = GL .DRAW_INDIRECT_BUFFER ;
16001586 gl .bindBuffer (type , b .data );
16011587 gl .bufferSubData (type , startVertex * stride , streamData (buf .getData (),bufPos ,vertexCount * stride ), bufPos * STREAM_POS , vertexCount * stride );
16021588 #else
1589+ var type = GL .ARRAY_BUFFER ;
16031590 var sub = new Uint8Array (buf .getData (), bufPos , vertexCount * stride );
16041591 gl .bufferSubData (type , startVertex * stride , sub );
16051592 #end
0 commit comments