Gamua / Starling-Framework

The Cross Platform Game Engine
http://www.starling-framework.org
Other
2.87k stars 826 forks source link

[Request] Get Texture of a Filter #718

Open LorenzGit opened 9 years ago

LorenzGit commented 9 years ago

When I apply a filter to a DisplayObject a new Texture is created. Would be nice to have a way to retrieve that texture. Also would be great to be able to set the resolution parameter of a texture because If you try to apply a filter on a device with insane resolution you could get an error because larger than 2048.

PrimaryFeather commented 9 years ago

Thanks for the reminder!

PrimaryFeather commented 8 years ago

Just a quick update: while you still can't retrieve that texture, at least Starling 2.0 now checks for the maximum texture size at run-time and adapts the filter resolution so that it doesn't cause an exception. You can also manually modify the texture resolution (via filter.textureResolution).

(Creating a texture on the fly is still planned, but I haven't come around to do it yet.)