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.
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.