kottore / away3d

Automatically exported from code.google.com/p/away3d
0 stars 0 forks source link

Feature to clear bitmap cache in WhiteShadingBitmapMaterial (or texture setter) #95

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Currently you can't change WhiteShadingBitmapMaterial texture by changing 
content of BitmapData because there is no way to clear "cache" variable. 
One has to recreate material every time you change texture.

I am not talking about animated textures here, but still an ability to 
easily swap it once in a while would be nice.

Original issue reported on code.google.com by makc.the...@gmail.com on 12 Feb 2010 at 12:34

GoogleCodeExporter commented 8 years ago
p.s. what I did on my side was this mod
    public function clearCache ():void {
        CacheStore.whiteShadingCache[_bitmap] = new Dictionary(true);
        cache = CacheStore.whiteShadingCache[_bitmap];
    }
not really possible via inheritance because both _bitmap and cache are private 
:(

Original comment by makc.the...@gmail.com on 12 Feb 2010 at 1:02

GoogleCodeExporter commented 8 years ago
added a clearCache() method to the WhiteShadingBitmapMaterial class

http://code.google.com/p/away3d/source/detail?r=2675
http://code.google.com/p/away3d/source/detail?r=2676

Original comment by rob.bate...@gmail.com on 4 Jul 2010 at 8:23