gluQuadric vs. Managed C++

I was wondering if anyone knows of any known issues with using gluQuadric in mananged C++. I’m just trying to draw a sphere, and it works fine in my unmanaged code. But when I port that same code over to a managed project, I get the error:

unhandled exception of type ‘System.TypeLoadException’

Additional information: Could not load type GLUquadric from assembly

Anyone have any ideas? Is there a way I can bypass this without sacrificing drawing spheres?

[This message has been edited by pacman155 (edited 08-07-2003).]

Heh, glu is not needed to draw a sphere in OpenGL. If it was, OpenGL would be pretty crappy. Good thing it’s not. You can draw sphere’s many other ways. Compute the verticies yourself using some math (spherical coordinates come to mind), load a 3d model, whatever. BTW, you can mix managed and unmanaged code. Something like this:

#pragma unmanaged
void DrawSphere( float radius )
{
call glu function to draw a sphere
}
#pragma managed

-SirKnight

It’s true, glu isn’t required to draw spheres, but then again std isn’t required to use linked lists, either. :stuck_out_tongue:

But those pragma lines are interesting, I’ll have to try those. Thanks for the tip!