Results 1 to 6 of 6
Thread: Weird Managed DirectX Error
April 15th, 2007, 08:43 PM #1419Registered User
Weird Managed DirectX Error
As you can see in the image below, the mesh I've rendered using DirectX only draws half of the triangles. I can't figure out why, and the error isn't affected by Cullmode.
Has anyone had errors like this in the past?
April 16th, 2007, 02:07 AM #26,170iAm t3h hybrid
mine can't even render 9.0c
what video card is that? may be driver issues, or try updating your direct x installation
April 16th, 2007, 04:27 AM #3158Code Monkey
It could be a few things:
- You might have a winding issue with your polygons - make sure that they're all wound the same way (the best way to test if this is the issue is to turn off backface culling and see if it works).
- Your mesh definition might contain all the points, but the triangles aren't being read in properly (eg. you might be reading the points but not reusing the points for every second triangle?)
- Those triangles might not be in the mesh definition at all - if you're using a custom exporter/importer or something then it might be skipping information. Double check to see if the triangles are coming in properly.
may be driver issues, or try updating your direct x installation
Al6200, try looking into the above issues and let us know how you go.
OJNot getting answers? Read this!
April 17th, 2007, 04:11 AM #4161Registered User
April 17th, 2007, 06:39 AM #5419Registered User
I turned out to be my code. Apparently I only defined half of the indices... I'd suppose I had assumed while writing it that defining 6 indices for a square was too much.
April 17th, 2007, 09:25 PM #6158Code Monkey
The key here is to remember that even if you're drawing a square, you are still drawing them as triangles, and each triangle needs 3 vertices.Not getting answers? Read this!