Foros - Stratos

Proyectos => Jad Engine => Mensaje iniciado por: Diferencial en 26 de Junio de 2006, 08:58:47 PM

Título: Un fallo que no veo.
Publicado por: Diferencial en 26 de Junio de 2006, 08:58:47 PM

          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.
Título: Un fallo que no veo.
Publicado por: Diferencial en 26 de Junio de 2006, 10:28:00 PM
(http://es.geocities.com/fjermas/Imagen.Jpg)
Este es el resultado. Estan dibujando pero no sale nada.
Título: Un fallo que no veo.
Publicado por: Haddd en 27 de Junio de 2006, 12:42:28 PM

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();
Título: Un fallo que no veo.
Publicado por: Diferencial en 27 de Junio de 2006, 01:21:08 PM
Muchas gracias haddd, me estaba volviendo loco.