View Full Version : gluQuadric vs. Managed C++

08-07-2003, 07:51 AM
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).]

08-07-2003, 09:22 AM
Heh, glu is not needed to draw a sphere in OpenGL. If it was, OpenGL would be pretty crappy. Good thing it's not. http://www.opengl.org/discussion_boards/ubb/smile.gif 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


08-07-2003, 09:49 AM
It's true, glu isn't required to draw spheres, but then again std isn't required to use linked lists, either. :P

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