0
votes
3answers
150 views

Why I am I told “Color0 is missing” when I run the following code?

In the code below, I want to draw a box on my screen. But when I run it, there is an error message: The current vertex declaration does not include all the elements required by the current ...
0
votes
1answer
133 views

How to control in the vertex shader where pixel ends up in the renderTarget?

What if I have an arbitrary renderTarget, that is smaller than the screen (say it is 1x1 pixel) and I want to make sure in the VertexShaderFunction that all my pixels end up exactly in that 1 pixel ...
1
vote
4answers
229 views

Selecting and moving vertices

How can I identify the correct vertecis and move them in XNA using VertexBuffer? Let's say I have a simple cuboid in my project and want to move one face of it. How would I loop thru vertices, get ...
2
votes
1answer
1k views

How can I draw multiple vertexbuffers with indices?

I'm using to types of vertices. For the triangles: 0 Vector3 Position, 12 Color Color, 16 Vector3 Normal For the lines: 0 Vector3 Position, 12 Color Color I setup a vertex buffer for each ...