manipulat
Messages postés1Date d'inscriptionmercredi 5 octobre 2005StatutMembreDernière intervention 3 mai 2010
-
1 mars 2010 à 11:23
JUSTLOVE1
Messages postés5Date d'inscriptiondimanche 6 novembre 2011StatutMembreDernière intervention14 mai 2012
-
8 mars 2012 à 17:05
Bonjour tout le monde je me permet de poser une question car je ne comprend pas bien l'origine du probleme, c'est une partie de mon code servant a afficher un mesh, ce code bug au niveau du chargement du fichier .X
Je pense qu'il y a une erreur sur le lien ver le fichier
using System;
using System.Drawing;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using System.Windows.Forms;
using System.Data;
using Microsoft.DirectX;
using Microsoft.DirectX.Direct3D;
namespace rush_1
{
class Mesh_aff
{
Engine engine;
Device device;
Mesh mesh;
Material[] meshmat;
Texture[] meshtext;
public void init(ref Engine engine)
{
this.engine = engine;
ExtendedMaterial[] materials;
mesh = Mesh.FromFile(Application.StartupPath + "\\sphere.X", MeshFlags.SystemMemory, device, out materials);
meshtext = new Texture[materials.Length];
meshmat = new Material[materials.Length];
for (int i = 0 ; i < materials.Length; i++)
{
meshmat[i] = materials[i].Material3D;
meshtext[i] = TextureLoader.FromFile(device, Application.StartupPath + "\\earth.bmp");
}
}
public void rendu()
{
for (int i = 0; i < meshmat.Length; i++)
{
device.Material = meshmat[i];
device.SetTexture(0, meshtext[i]);
mesh.DrawSubset(i);
}
}
}
}
Le debuggeur me dit que "l'exeption Direct3DXExeption n'a pas été gérée"
a la ligne
mesh = Mesh.FromFile(Application.StartupPath + "\\sphere.X", MeshFlags.SystemMemory, device, out materials);
JUSTLOVE1
Messages postés5Date d'inscriptiondimanche 6 novembre 2011StatutMembreDernière intervention14 mai 2012 8 mars 2012 à 17:05
Salut,
Mr pouvez-vous m'aider par l'application code mesh, car je peut charger un fichier .X (directX) pour import un modélé 3D au niveau de code c#(Visual studio)
MERCI BEAUCOUP BEAUCOUP Parce que je suis dans le besoin urgent