画3D线

时间:2015-08-15 11:11:44

标签: c# opengl opentk

我正在尝试使用c#和openTK绘制3D线,但是当我运行该程序时没有任何反应。有人能告诉我代码中缺少什么

   GameWindow window = new GameWindow();
   GLControl control = new GLControl();
   GL.Clear(ClearBufferMask.DepthBufferBit |ClearBufferMask.ColorBufferBit);
   GL.MatrixMode(MatrixMode.Modelview);
   GL.MatrixMode(MatrixMode.Projection);
   GL.LoadIdentity();
   GL.Begin(BeginMode.Lines);

   GL.Color3(Color.Blue);
   GL.Vertex3(100, 100, 0);
   GL.Vertex3(100, 100, 0);
   GL.End();}

0 个答案:

没有答案