Skip to content

Commit

Permalink
fix call to Vector.ofArray() for Vector<UInt> by passing Array<UInt>
Browse files Browse the repository at this point in the history
  • Loading branch information
joshtynjala committed Nov 10, 2023
1 parent ab270ec commit e070e3e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion away3d/core/managers/RTTBufferManager.hx
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,8 @@ class RTTBufferManager extends EventDispatcher

if (_indexBuffer == null) {
_indexBuffer = _stage3DProxy.createIndexBuffer(6);
var v:Vector<UInt> = Vector.ofArray([2, 1, 0, 3, 2, 0]);
var a:Array<UInt> = [2, 1, 0, 3, 2, 0];
var v:Vector<UInt> = Vector.ofArray(a);
_indexBuffer.uploadFromVector(v, 0, 6);
}

Expand Down
3 changes: 2 additions & 1 deletion away3d/core/render/BackgroundImageRenderer.hx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ class BackgroundImageRenderer
_vertexBuffer = _stage3DProxy.createVertexBuffer(4, 4);
_program3d = context.createProgram();
_indexBuffer = _stage3DProxy.createIndexBuffer(6);
var v:Vector<UInt> = Vector.ofArray([ 2, 1, 0, 3, 2, 0 ]);
var a:Array<UInt> = [ 2, 1, 0, 3, 2, 0 ];
var v:Vector<UInt> = Vector.ofArray(a);
_indexBuffer.uploadFromVector(v, 0, 6);
_program3d.upload(new AGALMiniAssembler(Debug.active).assemble(Context3DProgramType.VERTEX, getVertexCode()),
new AGALMiniAssembler(Debug.active).assemble(Context3DProgramType.FRAGMENT, getFragmentCode())
Expand Down

0 comments on commit e070e3e

Please sign in to comment.