public void DrawRect(Point3D p1, Point3D p2, Point3D p3, Point3D p4, Point3D normal) { Point3D pm = Point3D.GetLineMidpoint(p1, p3); fScene.DrawTriangle(p1, pm, p2, normal); fScene.DrawTriangle(p2, pm, p3, normal); fScene.DrawTriangle(p3, pm, p4, normal); fScene.DrawTriangle(p4, pm, p1, normal); /*OpenGL.glBegin(OpenGL.GL_POLYGON); * OpenGL.glVertex3f(p1.X, p1.Y, p1.Z); * OpenGL.glVertex3f(p2.X, p2.Y, p2.Z); * OpenGL.glVertex3f(p3.X, p3.Y, p3.Z); * OpenGL.glVertex3f(p4.X, p4.Y, p4.Z); * OpenGL.glEnd();*/ }