Thanks, I’ll test soon. Btw, how I can display drawcalls?
The performance is still low
Especially, when animation contains color transforms.
Btw, can you make a flag to set color transform of animation to false?
If I use isNative = false, many of animations are broken, but it increases performance!
About drawcalls, you can add it:
var fps:openfl.display.FPS = new openfl.display.FPS();
fps.textColor = 0xffffff;
this.addChild(fps);
It seems that you use more isNative? This will undoubtedly hurt performance.
A lot of animation is usually avoided on one screen. Or use tilemap to improve performance.
isNative = false works wrong, if there are more than 1 animation.
If I play 1 animation, It shows the first frame of other animations
If the color conversion is disabled, will performance improve?
Is this a BUG? If so, you need to provide the location of the error, as well as the reference map.
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
I have consulted singmajesty about this before.
So anyone can implement it?
Also I noticed, that mask badly affects FPS. Especially on Android
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
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.
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 )
for openfl 9.1.0 this should be:
openfl.display._internal.stats.Context3DStats.totalDrawCalls();