this.sphere = new Actor();
this.sphere.ActorMesh = HMesh.CreateSphere(1f, 20, 20);
this.sphere.ActorMeshObject = Haddd.Scene.MeshObjects.Create("Sphere", false);
this.sphere.ActorMeshObject.Mesh = this.sphere.ActorMesh;
this.sphere.Material = new HMaterial[1];
this.sphere.Material[0] = new HMaterial();
this.sphere.Layer = new HMaterialLayer();
this.sphere.Material[0].AddLayer(this.sphere.Layer);
this.sphere.Layer.DiffuseMap.Texture = Haddd.Video.Textures.Create2D("Pared_Difusse", true);
this.sphere.ActorMeshObject.Material = this.sphere.Material;
No veo donde esta el fallo porque no me dibuja la esfera.
(http://es.geocities.com/fjermas/Imagen.Jpg)
Este es el resultado. Estan dibujando pero no sale nada.
this.sphere.Material[0] = new HMaterial();
Esto está mal. SI lees el changes.txt, verás esto:
Citar
Attention:
1. YOU MUST CREATE A NEW MATERIAL WITH Haddd.Scene.Materials.Create()
If you do it with new HMaterial(), the engine does not show anytihng on render
2. The DX meshes have been removed. Now you have to deal with VB & IB.
Así que :
this.sphere.Material[0] = Haddd.Scene.Materials.Create();
Muchas gracias haddd, me estaba volviendo loco.