Skip to main content
added markdown to code in text
Source Link
Pikalek
  • 13.4k
  • 5
  • 49
  • 54
device.DrawPrimitives(Microsoft.Xna.Framework.Graphics.PrimitiveType.TriangleStrip, 0, oScene.Mesh[0].VertexCount);

I believe the problem may be that you are using TriangleStripTriangleStrip instead of TriangleListTriangleList. It also primarily seems to be the draw call as well (based on my own quick test using your draw call). Try this:

device.DrawIndexedPrimitives(PrimitiveType.TriangleList, 0, 0, oScene.Mesh[0].VertexCount, 0, triangleCount);

You'll have to set triangleCountfromtriangleCountfrom the oScene.Mesh[0]oScene.Mesh[0] object (don't know what it is in Assimp, sorry). I'm currently using a draw call like this, and .OBJ files loaded from my own .OBJ importer work fine.

device.DrawPrimitives(Microsoft.Xna.Framework.Graphics.PrimitiveType.TriangleStrip, 0, oScene.Mesh[0].VertexCount);

I believe the problem may be that you are using TriangleStrip instead of TriangleList. It also primarily seems to be the draw call as well (based on my own quick test using your draw call). Try this:

device.DrawIndexedPrimitives(PrimitiveType.TriangleList, 0, 0, oScene.Mesh[0].VertexCount, 0, triangleCount);

You'll have to set triangleCountfrom the oScene.Mesh[0] object (don't know what it is in Assimp, sorry). I'm currently using a draw call like this, and .OBJ files loaded from my own .OBJ importer work fine.

device.DrawPrimitives(Microsoft.Xna.Framework.Graphics.PrimitiveType.TriangleStrip, 0, oScene.Mesh[0].VertexCount);

I believe the problem may be that you are using TriangleStrip instead of TriangleList. It also primarily seems to be the draw call as well (based on my own quick test using your draw call). Try this:

device.DrawIndexedPrimitives(PrimitiveType.TriangleList, 0, 0, oScene.Mesh[0].VertexCount, 0, triangleCount);

You'll have to set triangleCountfrom the oScene.Mesh[0] object (don't know what it is in Assimp, sorry). I'm currently using a draw call like this, and .OBJ files loaded from my own .OBJ importer work fine.

Source Link
Seta
  • 1.4k
  • 1
  • 10
  • 19

device.DrawPrimitives(Microsoft.Xna.Framework.Graphics.PrimitiveType.TriangleStrip, 0, oScene.Mesh[0].VertexCount);

I believe the problem may be that you are using TriangleStrip instead of TriangleList. It also primarily seems to be the draw call as well (based on my own quick test using your draw call). Try this:

device.DrawIndexedPrimitives(PrimitiveType.TriangleList, 0, 0, oScene.Mesh[0].VertexCount, 0, triangleCount);

You'll have to set triangleCountfrom the oScene.Mesh[0] object (don't know what it is in Assimp, sorry). I'm currently using a draw call like this, and .OBJ files loaded from my own .OBJ importer work fine.