View Full Version : Weird Managed DirectX Error
Al6200
April 15th, 2007, 09:43 PM
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?
http://img440.imageshack.us/img440/8803/errorindirectxho7.png
hybrid101
April 16th, 2007, 03:07 AM
mine can't even render 9.0c:P
what video card is that? may be driver issues, or try updating your direct x installation:)
TheColonial
April 16th, 2007, 05:27 AM
It could be a few things:
You might have a winding (http://en.wikipedia.org/wiki/Rasterisation#Backface_Culling) 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 installationPossibly, but I really do doubt it :) My vote is with the code, not DirectX.
Al6200, try looking into the above issues and let us know how you go.
OJ
Ar3d
April 17th, 2007, 05:11 AM
what card are you using? did your card support direct9c if not get the latest version of your driver for your video card.
Al6200
April 17th, 2007, 07:39 AM
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.
TheColonial
April 17th, 2007, 10:25 PM
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.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.