By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,467 Members | 1,500 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,467 IT Pros & Developers. It's quick & easy.

[DirectX] Can't see the fourth point

P: n/a
Hi All,

I modified the sample code, but just can't see the fourth point, there
is always a triangle.

Best regards,
Boki.

////////////////////////////////////////////////////////////////////////////////////////////
public void OnCreateVertexBuffer(object sender, EventArgs e)
{
VertexBuffer vb = (VertexBuffer)sender;
GraphicsStream stm = vb.Lock(0, 0, 0);
CustomVertex.TransformedColored[] verts = new
CustomVertex.TransformedColored[4];

verts[0].X=150;verts[0].Y=0;verts[0].Z=0.5f; verts[0].Rhw=1;
//verts[0].Color = System.Drawing.Color.Aqua.ToArgb();
verts[1].X=250;verts[1].Y=250;verts[1].Z=0.5f; verts[1].Rhw=1;
//verts[1].Color = System.Drawing.Color.Brown.ToArgb();
verts[2].X=50;verts[2].Y=350;verts[2].Z=0.5f;
verts[2].Rhw=1;//verts[2].Color =
System.Drawing.Color.LightPink.ToArgb();

/////////// Add fourth point here //////////////////////////////
verts[3].X = 30; verts[3].Y = 450; verts[3].Z = 0.5f;
verts[3].Rhw = 1;//verts[2].Color =
System.Drawing.Color.LightPink.ToArgb();

stm.Write(verts);
vb.Unlock();
}

May 15 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.