Archived

This topic is now archived and is closed to further replies.

Quadrics hate me

This topic is 5008 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ok, what is wrong with this code? void DrawTorpedo() { GLUquadricObj* mySphere; mySphere = NULL; mySphere = gluNewQuadric(); if(mySphere!=NULL) gluDeleteQuadric(mySphere); } It compiles fine, but I get the following error when I run it: --- An unhandled exception of type ''System.TypeLoadException'' occurred in Demo.exe Additional information: Could not load type GLUquadric from assembly Demo, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null. --- Oh the frustration. Little help here please? My program was going great until I tried adding Quadrics.

Share this post


Link to post
Share on other sites
You are missing the glu stuff in the header that tells the function that you are going to be using a quadric and then it is also needed whe you pass it to your function where you are rendering the object

looks something like this...
void myFunc(GLUquadricObj *myObj)

Peace, Love and Rabid Chipmunks - B :-P

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
this is due to a mixture of .net managed and unmanaged code.

to fix it just add

class GLUquadric { };

to the top of the cpp file you are working on...

for more info, visit here:

http://www.winterdom.com/mcppfaq/archives/000262.html

Share this post


Link to post
Share on other sites