**Hi all I made a terrain through making an array of four point using VertexPositionColorTexture type and then use function drawuserprimitives and use trainglestrip technique to make the draw and here is the code
const float BOUNDARY = 160000;
VertexPositionColorTexture[] mVertGround = new VertexPositionColorTexture[4];
VertexDeclaration mVertPosColorTex=new VertexDeclaration(graphics.GraphicsDevice, VertexPositionColorTexture.VertexElements);
private void init_ground() //called in he intialize() method
{
Vector2 uv = new Vector2(0.0f, 0.0f);
Vector3 pos = new Vector3(0.0f, 0.0f, 0.0f);
// set for vertices of surface with uv, pos, and color data
uv.X = 24.0f; uv.Y = 24.0f; pos.X = -BOUNDARY; pos.Y = -10.0f; pos.Z = -BOUNDARY;
mVertGround[0] = new VertexPositionColorTexture(pos, Color.Green, uv); //front right
uv.X = 24.0f; uv.Y = 0.0f; pos.X = BOUNDARY; pos.Y = -10.0f; pos.Z = -BOUNDARY;
mVertGround[1] = new VertexPositionColorTexture(pos, Color.Red, uv); //back right
uv.X = 0.0f; uv.Y =24.0f; pos.X = -BOUNDARY; pos.Y = -10.0f; pos.Z = BOUNDARY;
mVertGround[2] = new VertexPositionColorTexture(pos, Color.Blue, uv); //front left
uv.X = 0.0f; uv.Y = 0.0f; pos.X = BOUNDARY; pos.Y = -10.0f; pos.Z = BOUNDARY;
mVertGround[3] = new VertexPositionColorTexture(pos, Color.White, uv); //back left
}
private void draw_ground() //called in the draw method
{
// 3: build cumulative world matrix using I.S.R.O.T. sequence
// identity, scale, rotate, orbit(translate & rotate), translate
mMatWorld = Matrix.Identity ;
// 4: pass wvp matrix to shader
mfxTex.Parameters["fx_WVP"].SetValue(mMatWorld * mMatView * mMatProj);
mfxTex.Parameters["fx_Texture"].SetValue(grass);
mfxTex.CommitChanges();
// 5: draw object - select vertex type, primitive type, # of primitives
graphics.GraphicsDevice.VertexDeclaration =mvertalaa;
graphics.GraphicsDevice.DrawUserPrimitives<VertexPositionColorTexture>(
PrimitiveType.TriangleStrip, mVertGround, 0, 2);
}
The question here is how can I implement multitextureing to this terrain
**