Tips to increase performance (html5)

Ok, looks like issue is not in color transform.

Created issue:

Btw, will isNative false will support color transform?

I have not found Openfl with related APIs to implement this. isNative has restrictions. Do not support color changes , and multiple textures are not supported.

Do you know, where we can create post and request a feature about colors?


Maybe here? I remember that older versions of Openfl had this support, might have been removed for API compatibility reasons.

Can you post please? Because you undestand this thing deeper that me :slight_smile:

I have consulted singmajesty about this before. :rofl:

So anyone can implement it? :smiley:

Also I noticed, that mask badly affects FPS. Especially on Android :frowning:

If you just need to use clipping for a part of your display object, you should use scrollRect instead of mask, because scrollRect uses the “scissor” GL commands to achieve this, so it’s hardware accelerated :slight_smile:

2 Likes

Yes, I need just clipping. I’ll tried scrollRect, but same result. I’ll compare with mask once again little later. Thanks

You might want to use the Spector browser plugin (or any WebGL inspector) to figure out what is going on behind the scene.
It really helps to understand the rendering flow and reduce the number of draw calls.

2 Likes

Btw how easily display drawcalls? new FPS shows only fps. No additional data (memory or drawcalls).

Depending on your version of OpenFL, it should be
openfl._internal.renderer.opengl.stats.GLStats.totalDrawCalls()
or
openfl._internal.renderer.context3D.stats.Context3DStats.totalDrawCalls()

( by the way, you need to compile with -Dgl_stats to make it work )

2 Likes

for openfl 9.1.0 this should be:
openfl.display._internal.stats.Context3DStats.totalDrawCalls();