Category: Haxe

After my initial post about the Away3D port to OpenFL, I’ve spent quite a bit of time working through the code trying to get more and more examples working. On top of this, OpenFL was updated to 2.0 and changes were needed to re-work the Away3D port for it to function. Unfortunately, it wasn’t a simple case of renaming flash.* to openfl.* plus, other bugs kept getting in the way.

Finally I’ve got to a point where some more fundamental functionality has been implemented and works across platforms, for the most part (more on that later) and as such have marked this release as 1.0.0-alpha. There are still plenty of issues to be resolved but this represents a large subset of core functionality.

From within the project folder e.g. /development/openfl/Basic_View to build and test the application simply use the following, specifying an OpenFL target.

lime test <target>

Areas for improvement/Problems

With this release there are a number of known, but not fixed, issues but will hopefully be address when I (or someone else in the community) can get around to fixing them.

WebGL/OpenGLES

I’m not an expert in WebGL/OpenGLES and so there are situations where the generated gl commands may not be optimal and also may be problematic in some circumstances. One of these areas is the allocation of frame/render buffers when rendering to textures. There are some warnings that appear through native traces or WebGL Inspector in Chrome which I’ve not got to the bottom of yet.

RenderToTexture on iOS

Whilst the rendering to texture works across platforms there is an issue with restoring the default buffers back after the render to texture. In OpenFL 1.4, it was possible to retrieve the ID of the renderbuffer so it could be restored after a RTT. Unfortunately, that call, or specifically the ENUM used to get the buffer is commented out of the NME backend. It’s made more complicated by the fact that the type returned should be a WebGLRenderBuffer/WebGLFrameBuffer rather than an ID as was previously used. I’ve just not been able to work through the tooling required to get the development version of NME setup with Lime and then to OpenFL to try and fix this issue.

iOS Texture/Lighting issue

As you will see in the video above, there are some odd artifacts coming through in the Basic_LoadAWD example on iOS. Similarly, the colours of the lighting on the Basic_Fire demo are also too saturated.

Android Loading AWD

There is a problem reaching a premature EOF on Android with the Basic_LoadAWD demo which is proving difficult to track down at the moment.

Moving forward

Hopefully some of the above issues will get resolved soon and more examples will be added demonstrating further completeness of functionality.

If you give it a try and find any issues, please log them on GitHub for either the core library or examples and I’ll get to them when I can. Should you wish to fix the issues yourself then that would be fantastic, just fork and send a Pull Request to get your changes into the project. Your help & support is greatly encouraged.