Fun with PIX

Just a quick update from my last post.

I mentioned that I was just getting the following output from my current rendering code:

image-2.jpg

I had posted on the XNA Forums that I was “completely in the dark” as to what was going on after a call to draw my model. The suggestion there was to use PIX, which is part of the DirectX SDK for Windows. Well, one 438MB download later and feeling like a challenge, it seems PIX has helped me at least identify the issue.

I am sending the position, normal and colour information to the graphics device plus the indices to tell it how to arrange that data into triangles. Well for testing purposes, I have told it to draw 1 triangle and I seem to be getting the right size vertex buffer to be passed to the graphics device but all its values are 0.

This essentially means I am drawing an object so small it has no dimensions, in black and on a black background. Working as intended then…

I am clearly missing the point somewhere when I construct my VertexBuffer in my ContentProcessor but at least PIX showed me the way!

I’ve posted an update to this.