I am receiving a error when trying to Convert a height map into a 3d landscape using c#. I have managed to get the height map into a matrix with a wireframe I am also able to colour sections depending on height. The issue is that I am so far unable to add textures to the landscape like grass, snow and water etc.
These are the errors
"The current vertex declaration does not include all the elements required by the current vertex shader. Normal0 is missing."
And also
"DrawUserIndexedPrimitives(PrimitiveType.TriangleList, vertices, 0, vertices.Length, indices, 0, indices.Length / 3, VertexPositionColor.VertexDeclaration);"
So any help is appreciated.
5 replies to this topic
#1
Posted 08 March 2011 - 08:26 AM
|
|
|
#2
Posted 08 March 2011 - 09:16 AM
Would need to know what graphics API you're using, and the part of your source code that's producing the error.
#3
Posted 08 March 2011 - 09:29 AM
Will do so.
Here you go
Here you go
{
pass.Apply();
device.DrawUserIndexedPrimitives(PrimitiveType.TriangleList, vertices, 0, vertices.Length, indices, 0, indices.Length / 3, VertexPositionColor.VertexDeclaration);
}
base.Draw(gameTime);
Edited by Georgeman, 08 March 2011 - 10:41 AM.
#4
Posted 08 March 2011 - 09:40 AM
EDIT = Made two posts by mistake.
Edited by Georgeman, 08 March 2011 - 12:51 PM.
#6
Posted 16 March 2011 - 11:05 AM
hello again...i need a help...i want to upgrade my program with cell controlling...i have xml file and i'm reading that file into datagridview control so i have columns that i have defined in xml file...what i want is to make sure that user enters a valid value in some cell...if some column must contain character value (not numeric or something else) and user enters wrong value program must display text message like "wrong input" and program must erase everything that user enters in that cell with error
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account

Back to top









