Relation of OpenFl to OpenGL (ES)

Hi there,

I have a project, that I want to use Haxe for and if possible OpenFl on top but first I need to understand the relation between OpenFl and OpenGL ES when targeting mobile platforms, specifically:

When targeting mobile platforms, how do I ensure that all graphics rendering happens via OpenGL ES? Do I need to go though specific parts of the API, like openfl.display.Context3D or is the basic Flash-API fully suited for hardware acceleration?

In case that it helps to know what I’m up to: What I need to do, is to constantly re-define 2D-polygons (60x/sec) and be as flexible as possible when it comes to ‘filling’ those polygonal areas on screen, for example by simply texturizing them or displaying animated content or video within those polygonal areas and so on. However, I’d like to avoid having to write my own shaders, if possible.

Would OpenFl even be the right tool to do that? If so, could you point me into the right direction?

Thanks a lot in advance.

Hi, does this help at all?

Hi @Confidant, thanks for your answer. That comment does state that lime provides GL context by default for mobile, so I guess that could mean that all rendering is done via GL by OpenFl, since that is built upon Lime… The problem is that I’m just guessing :smiley: It would be nice to hear that from someone, who actually knows. That and whether the entire API will work, when targeting GL (possibly by default)

Well I can say that Lime is what handles the tech part of the rendering. OpenFL is mainly what makes things more “Flash-like” and it runs on top of Lime. I also know that most of the API works on the WebGL target but you may run into some inconsistencies such as text or filters rendering slightly differently.

3 Likes