Bitmap data issues in BitmapTexture.hx
jasonsturges opened this issue · 2 comments
When compiling targeting mac platform, compiler is reporting position
and readUnsignedByte()
are not fields of haxe.io.Bytes
.
/Users/jasonsturges/Projects/away3d-core-openfl/away3d/textures/BitmapTexture.hx:74: characters 8-21 : haxe.io.Bytes has no field position
/Users/jasonsturges/Projects/away3d-core-openfl/away3d/textures/BitmapTexture.hx:78: characters 15-28 : haxe.io.Bytes has no field position
/Users/jasonsturges/Projects/away3d-core-openfl/away3d/textures/BitmapTexture.hx:80: characters 34-55 : haxe.io.Bytes has no field readUnsignedByte
From BitmapTexture.hx, data
is defined as:
#if flash
var data = BitmapData.getRGBAPixels (_bitmapData);
#elseif js
var data = ByteArray.__ofBuffer (@:privateAccess (bitmapData.__image).data.buffer);
#else
var data = @:privateAccess (bitmapData.__image).data.buffer;
#end
Implemented as:
data.position = 0;
data.readUnsignedByte ();
Issue can be replicated from my OpenFL Away3D Terrain Demo repository here at GitHub.
Also, there is attempted access of field __image
, which does not exist on openfl.display.BitmapData
@:privateAccess (bitmapData.__image).data.buffer;
Environment:
away3d: [dev:/Users/jsturges/Projects/away3d-core-openfl]
Away3D at origin/master SHA bf25b17 from Jun 15, 2015
lime: 2.6.0 [2.6.1]
openfl: 2.2.4 3.3.1 [3.3.2]