Hello, I'm having issues with MovieMaterials with autoUpdate = false,
especially wrt calling update() on the MovieMaterial instance before
being rendered. I.e.,
1. Create a Sprite with some contents
2. Create a new MovieMaterial(contentSprite, {autoUpdate:false,
transparent:false})
3. Assign material to some object but don't add the object to the scene
yet
4. Call .update() on the moviematerial
The material is rendered all black.
I think this happens because the "movie" is only ever rendered by update()
if the _renderBitmap is non-null, but it's null before any calls to
view.render().
What do you think about the following patch, which seems to make things
work out nicely?
Index: src/away3d/materials/MovieMaterial.as
===================================================================
--- src/away3d/materials/MovieMaterial.as (revision 2164)
+++ src/away3d/materials/MovieMaterial.as (working copy)
@@ -158,7 +158,7 @@
{
super.updateMaterial(source, view);
- if (autoUpdate)
+ if (autoUpdate || !rendered)
update();
_session = source.session;