-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GBlendModeFunc allocation issue (Flash) #17
Comments
Could we use a switch in a scenario like this? The following code works and fixes the allocation issue:
|
This is definitely doable however it renders dynamic addition of custom blendmodes impossible. However not sure if that is a big issue as I am not aware of anyone using custom blendmodes in the years I worked or consulted on many Genome2D projects/games. |
What's the current method for adding a blendmode? The default switch statement could search an array or typed vector (if not null) based on a custom blendmode passed in during init. For now, I'll just take compiling an SWC with a custom blendmode if I ever need one. |
I recently updated from an old version of the Genome2D SWC and started memory profiling because I was getting regular garbage collection events that cause application stutter. I found that the Haxe function
Type.enumParameters
is frequently called, mentioned in this request: pshtif/Genome2D-ContextCommon#1The issue is being caused by
GBlendModeFunc.setBlendMode()
, fromIGContext.begin()
. It seems like any time the blendFactors array is referenced, it generates a new entity and quickly consumes memory. Is there a way to avoid this?Here's the hierarchy and allocations in my app after about 5 minutes of runtime:
The text was updated successfully, but these errors were encountered: