在C#中的OpenGL中绘制Sphere [英] drawing Sphere in OpenGL in C#
问题描述
我正在尝试在C#应用程序中使用openGL绘制球体.
代码是
Im trying to draw sphere using openGL in C# application.
code is
GLUquadric quadratic;
public override void glDraw()
{
GL.gluSphere(this.quadratic, 1.3f, 32, 32);
}
错误是
错误1找不到类型或名称空间名称"GLUquadric"(您是否缺少using指令或程序集引用?)
请帮助
Error is
Error 1 The type or namespace name ''GLUquadric'' could not be found (are you missing a using directive or an assembly reference?)
Plz help
Thanks!!!
推荐答案
错误1类型或名称空间找不到名称"GLUquadric"(您是否缺少using指令或程序集引用?)
Error 1 The type or namespace name ''GLUquadric'' could not be found (are you missing a using directive or an assembly reference?)
线索出在问题中...
确保您已包含
The clue is in the question...
Make sure you have included a
using Tao.OpenGl
该语句位于类的顶部,并且通过右键单击解决方案资源管理器中的项目"引用"文件夹并选择添加引用",还可以在包含该类的项目中包含对DLL的引用.
statement at the top of the class and also include a reference to the DLL in the project that contains the class by right-clicking the Projects ''References'' folder in the Solution Explorer and selecting ''Add Reference.
这篇关于在C#中的OpenGL中绘制Sphere的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!