Help with DirectX 11

Started by
2 comments, last by Erik Rufelt 14 years, 5 months ago
Hello. I have a little problem with D3D11. After I downloaded the SDK I modified a program that worked on the beta SDK and tried to run it. Unfortunately the program produces an unexpected output. Instead of drawing a 2D red triangle on the screen all I get is a red dot in the middle of my window. Can anyone help me with this? This is the source code for the shader: http://razvan1024.pastebin.com/f3d85c384 The source code for the program: http://razvan1024.pastebin.com/f45c50a85 Thanks in advance for the help.
Advertisement
You don't seem to set the primitive topology. Try using pDeviceContext->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST), before drawing your triangle.

You can also use [source]..code..[/source] tags to post code directly here on GameDev:
..code..
Thanks for the help but that didn't solve the problem. I added it the call and now I don't even get the red dot anymore.
Then perhaps your triangle is facing away from the camera, and face culling is enabled.

This topic is closed to new replies.

Advertisement