[Logo]
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing  
[Register] Register / 
[Login] Login 
How to properly dispose of bitmap from MovieClipMaterial  XML
Forum Index » Alternativa3D 5
Author Message
taurus76


Joined: 25/06/2009 14:09:51
Messages: 16
Offline

Hi!

I've got problems with MovieClipMaterial

When I change the material the bitmap from MovieClipMaterial remains in alt3d engine and is still used.

First i change the material to new one and then I try:
mcMaterial.texture.bitmapData.dispose();

Bu then I get errors every frame: (even when there is another material assigned to the object)

ArgumentError: Error #2015: Invalid BitmapData.
at flash.display::BitmapData/fillRect()
at alternativa.engine3d.materials::MovieClipMaterial/redraw()[G:\works\Alternativa3D\src\alternativa\engine3d\materials\MovieClipMaterial.as:111]

thx
T76
mike


Joined: 01/06/2008 00:00:06
Messages: 786
Offline

There's a bug in MovieClipMaterial. It's unlikely that there will be fix updates for 5.x version, so you can use this code for the material class to make your own.

This message was edited 1 time. Last update was at 11/09/2010 21:37:43

makc

[Avatar]

Joined: 02/06/2008 12:19:17
Messages: 1535
Offline

how about opensourcing the rest of it? could make some noise on teh interwebs
[WWW]
 
Forum Index » Alternativa3D 5
Go to:   
Powered by JForum 2.1.8 © JForum Team