Bonjour à tous !
J'ai un petit soucis d'affichage. En faite, j'ai crée un repère qui est constitué de CustomVertex.PositionColored.
Lorsque que je lui crée pas de material, il ne s'affiche pas, lorsque j'en crée un, il s'affiche mais tout blanc...
Je n'arrive pas à comprendre pourquoi je ne peut plus rien afficher sans material....
voila comment j'affiche
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 public void Afficher(Moteur moteur) { if (cacheVertex != null && tableauVertex != null) { Material _m = new Material(); _m.EmissiveColor = ColorValue.FromColor(Color.White); moteur.device.Material = _m; moteur.device.RenderState.PointSize = 100.0f; moteur.device.VertexFormat = CustomVertex.PositionColored.Format; moteur.device.SetStreamSource(0, cacheVertex, 0); moteur.device.DrawPrimitives(PrimitiveType.LineList, 0, totalVertex / 2); } }
Partager