Drawing simple geometric figures with DrawUserPrimitives?
- by Navy Seal
I'm trying to draw a simple triangle based on an array of vertex. I've been searching for a tutorial and I found a simple example on riemers but I couldn't get it to work.
I think it was made for XNA 3 and it seems there were some changes to XNA 4?
Using this example:
http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series1/The_first_triangle.php
I get this error:
Additional information: The current vertex declaration does not
include all the elements required by the current vertex shader.
TextureCoordinate0 is missing.
I'm not english so I'm having some trouble to understand everything.
For what I understand error is confusing because I'm trying to draw a triangle color based and not texture based and it shouldn't need a texture.
Also I saw some articles about dynamic shadows and lights and I would like to know if this is the kind of code used to do it with some tweaks like culling because I'm wondering if its heavy code for performance in real time.