C#中怎么使用OpenGL的gluNewQuadric()
[DllImport(GLU_DLL, EntryPoint ="gluNewQuadric")]public static extern object gluNewQuadric ( );
用这种方式声明后,调用时出错,无法返回变量,C++里返回的是GLUquadricObj指针,该怎么用这个函数?
参考一下我以前使用的调用方法
......
......
......
//初始化语音卡
[DllImport("TC08A32.dll")]//初始化驱动程序的函数,成功返回0
public static extern int LoadDRV();
.....
.....
.....
bool yaInitSystem() //完成信号音检测的初始化工作
{
int DriverOpenFlag = LoadDRV();
if (DriverOpenFlag != 0)
{
MessageBox.Show("Load driver FALT");
return false;
}
if (EnableCard(TotalLine.ToString(), "1024 * 8") != (long)0)
{
FreeDRV();
MessageBox.Show("Enable Card FAIL");
return false;
}
Sig_Init("0");
timer1.Enabled = true;
return true;
}
.....
.....
.....