Available html5 renderers

I’m having some trouble understanding how openfl next renders in html5…

Does the openfl support the old canvas renderer, or only webgl now?
Is there an automatic capabilities detection and fallback like in pixi.js?
Can I detect at runtime what renderer has been chosen?


This is done at compile time, by default you are in canvas mode.
But you can do webgl openfl build html5 -Dwebgl and dom openfl build html5 -Ddom.

So is this possible to display in code, what render is used? A macro maybe?

You can do:

#if dom
#elseif canvas
#elseif webgl

You can also check:

1 Like

This is exactly what I was looking for! Thanks!