NURBS surface uncaught exception

Hi guys,

I am trying to create a NURBS surface. I’ve basically took the code out of the Red Book Surface.c and modified it into my own modeller just to get something working. My code compiles fine but on running my program I get an uncaught exception. The offending line seems to be:

GLUnurbsObj *theNurb = gluNewNurbsRenderer();

The example I got the code from uses GLUT, I am not.

Anyone know why I am getting this error?

Thanks for any help given!

it seems that you need to make a valid gl context current before you can use glu* functions. in glut i guess, this means that you have to use glutInit and maybe create a window.

i couldn’t reproduce a seg fault with gluNewNurbsRenderer, but when i tried gluScaleImage without a current context, it crashed.

Hi RigidBody,

I have created a RC already, my program renders ok without the NURBS surface code. Any other ideas?

Thanks

Found the soloution. Its a problem specific to mixing managed and unmanged C++

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

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.