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;
This is what I ended up doing to avoid having to hack the away3d sources;
I extended MovieMaterial and overrode updateMaterial():
public override function updateMaterial(source:Object3D, view:View3D):void
{
var origAutoUpdate:Boolean = autoUpdate;
if (_renderBitmap == null) {
// Workaround for autoUpdate-false bug + update() before any renders
// See our post at http://groups.google.com/group/away3d-dev/browse_thread/thread/7a398d69cb860756
this.autoUpdate = true;
}
super.updateMaterial(source, view);
this.autoUpdate = origAutoUpdate;
}
(Unfortunately "rendered" is private, not protected, so I had to check on _renderBitmap instead)