If you are using the ResourceManager than you are using an extremely
old version of the library. Please make sure that you pull the latest
library from GitHub often, or you will get a shock when 4.0 is finally
released with all the changes that have been happening over the last
couple of months.

Cheers
/R

On Jul 25, 12:26 pm, dbow <[email protected]> wrote:
> Hi Coffius!
> I've had the same problem.
> The model is without texture (white) because you apply the texture before
> the model is completely loaded by the* ResourceManager *(it loads the
> model asynchronously).
> I've solved this problem by checking the *subMeshes.length* property of the
> *Mesh* object that contains the loaded 3d model data.
>
> // in class body
> [Embed(source="/../embeds/ogrobase.jpg")]
> private var MyTexture : Class;
>
> private var mesh:Mesh;
>
> // load 3D object
> resourceManager = ResourceManager.instance;
> mesh = Mesh(resourceManager.getResource("assets/ogre.md2"));
>
> (...)
>
> // for debugging purposes you can put the code below in onRenderFrame or
> similar method
> // proper implementation would require separate event handling
> if(mesh.subMeshes.length > 0) {
>     mesh.material = new BitmapMaterial(new MyTexture().bitmapData);
>
> }
>
> BR,
> dbow
>
> http://www.doublebow.net

Reply via email to