Questions regarding GPU and Performance

Hello, I’m new to OpenFL and haxe, and I have some questions regarding OpenFL’s GPU usage, because I m trying to see if I should use Starling or OpenFL for my next project.
I m more familiar with Starling and one of the reason I chose it aside from familiarity is because I was able to create custom GPU filters that runs much faster than software filters.
My next project will be targeting the windows platform, so I will be using c++ as export target(which is one of the reasons I’m interested in haxe).

  1. Does OpenFL use gpu to render the classical displaylist? I heard that it’s faster if you use the TileSheet.drawTiles method but how much faster exactly?
  2. Is there anyway to render a filter using GPU? Or any chance of custom shaders?
  3. Does exporting to c++ for desktop make the program significantly faster than Stage3D or OpenFL for flash?
  4. The benchmarks I have seen online are out of date, and I would love to know the performance comparison between Starling and OpenFL from anyone’s recent experience or benchmarks.

Thanks a lot in advance.

I’ve only used OpenFL so I can tell anything else about other libraries.

  1. It uses the GPU but right now the displaylist will send each sprite to be rendered while drawTiles() will batch the sprites and render those batches so it will always be faster than the displaylist (if you batch correctly, of course). You can try the work in progress next they are working on with the define -Dnext where both methods will batch sprites. drawTiles() gives the user more control on how to batch them so it will be faster if the batches are done correctly.
  2. Not yet, planned for next.
  3. I don’t know about Stage3D, OpenFL only support the Stage traditional rendering so no 3D right now. They are adding Stage3D support though but I’m not sure if that has been released yet or it will be in the near future :sweat_smile:
  4. I can’t answer this question.

next is still on early stages of development, it’s a long job so it will still take a bit of time to get everything ready.

Thx a lot for the answers :smiley:

Stage3D is the low level API used in Starling, even though it’s a 3D API, Starling used it to render 2D content, kinda like how OpenFL uses OpenGL to render 2D contents. This aside, I would like to know if targeting c++ in OpenFL will be significantly faster than targeting flash in OpenFL.

Also the OpenFL “next” sounds very interesting and promising, will it be a right decision if I decide to wait for the stable “next” build to come out and start my project by then?

I knew about Stage3D and Starling and all that :sweat_smile: but I haven’t used it.

OpenFL will be faster targeting cpp than flash because it will be hardware accelerated (OpenGL) for the most part. It has a software rendering that you can hit in some cases though (I think that BitmapData.draw() triggers a software rendering).

OpenFL next will use only hardware accelerated (OpenGL) with no software rendering. You can start working on your project right now if you want because it will be compatible with what we have right now (and will add a few features o non flash targets too :smiley: ).

That sounds fantastic :smiley: I am mainly looking for the gpu shader filters which I can customize and make all kinds of cool stuffs. I hope that feature will come in next soon!

Thanks for your help!