Ahoy!
I’m trying to port a small prototype I made on Starling/ActionScript for the Ludum Dare 30 (loooong time ago ). I get the code converted by using the fantastic as3hx library. I’m using OpenFL and Starling Haxe port. It’s running pretty well when exported to Flash.
However, I just hit a wall when trying to export it to HTML5. The gray background is showing but the area where textures are supposed to be displayed is just a black rectangle.
I tried to set <haxedef name="webgl" if="html5" />
on project.xml
file with no luck. I also set <haxedef name="canvas" />
but then just the gray background is displayed, no black rectangle, no textures.
By checking the browser’s console, I got a bunch of WebGL warnings when exporting it as webgl
.
[Warning] WebGL: INVALID_OPERATION: texImage2D: ArrayBufferView not big enough for request
[Warning] WebGL: drawElements: texture bound to texture unit 0 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering or is not 'texture complete', or it is a float/half-float type with linear filtering and without the relevant float/half-float linear extension enabled. (ludumdare30.js, line 29564)
Any help would be appreciated!
P.S. Libraries I’m using right now:
actuate: [1.8.7]
as3hx: [1.0.3]
box2d: [1.2.3]
HaxePunk: [2.5.6]
hxcpp: 3.2.193 [3.3.49]
layout: [1.2.1]
lime-samples: [2.6.0]
lime: 2.7.0 [3.3.0]
nape: 2.0.19 [2.0.20]
openfl-ouya: [1.0.2]
openfl-samples: [4.0.0]
openfl: 3.4.0 [4.3.1]
starling: 0.3.8 0.4.0 0.5.7 [1.8.0]
swf: [2.3.0]