public void CanDrawSquare() { VertexBuffer vbuf = new VertexBuffer(Test_VertexBuffer.CUBE_VERTICES.Length); vbuf.CopyData(Test_VertexBuffer.CUBE_VERTICES); IndexBuffer ibuf = new IndexBuffer(Test_IndexBuffer.CUBE_INDICES.Length); ibuf.CopyData(Test_IndexBuffer.CUBE_INDICES); VertexFormat vfmt = new VertexFormat(Test_VertexFormat.CUBE_ATTRIBUTES); GraphicsSystem.BeginFrame(); GraphicsSystem.Clear(Color.Black); GraphicsSystem.Draw(vbuf, vfmt, ibuf); GraphicsSystem.EndFrame(); GraphicsSystem.Swap(); Bitmap image = _wnd.GrabScreen(); Assert.IsTrue(0 == image.GetPixel(30,30).R, "Square is larger than expected"); Assert.IsTrue(0 < image.GetPixel(48,48).R, "Square was not rendered"); }