Jump to content
  • Advertisement
Sign in to follow this  
boenzlip

OpenGL opengl NURBS c++ oop interface

This topic is 4952 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

hei folks i'm currently working on a 3d scroller vertical shooter and i want to define a "track" that leads the player through the world (in all 3D). to get a smooth movement i use NURBS to interpolate the track. i'm programming c++ object oriented on linux and opengl. i wanted to use the opengl nurbs library. to not only draw nurbs but also get the evaluator coordinates, i have to define a callback function: void World::initGraphics { gluNurbsCallback(theNurb, GLU_NURBS_VERTEX, vertexCallback); } but in a oop manner it is impossible (for me) to define a pointer to this function i tried: gluNurbsCallback(theNurb, GLU_NURBS_VERTEX, this->vertexCallback); but the compiler won't eat it... making the function static also makes no difference. additionaly i should also define the callback function like this: void CALLBACK vertexCallback(...); the "CALLBACK" tag isn't recognized by the g++ compiler... have you got any idea on how to implement the callback in oop manner. or alternativly, have you got any other nurbs libraries, that you can recommend me? btw: the opengl nurbs functions are they hardware accelerated and therefore much faster than any other nurbs library? thank you all for helping me and i wish you a happy new year! Patrick

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!