Jump to content
  • Advertisement

Archived

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

Canceler

GLUT Problem with glutDisplayFunc

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

Hi! Got a little problem when i did a simple glut app in an CApp Class. I put the functions: glutReshapeFunc (myReshape); glutKeyboardFunc(key ); glutIdleFunc (idle ); glutDisplayFunc (display ); In the constructor of the class, and put the functions myReshape, key, idle, display as memberfunctions of the class. Now i get the following error: ''glutReshapeFunc'' : cannot convert parameter 1 from ''void'' to ''void (__cdecl *)(int,int)'' for all 4 functions. Tried to write "this->myReshape" instead of "myReshape", but that wasnt working too. I hope for an fast answer, thanks and excuse my bad english!

Share this post


Link to post
Share on other sites
Advertisement
Are the functions you pass to GLUT static? A non-static member function is not the same as a "regular"/static function, and GLUT accepts "regular"/static functions only.

Share this post


Link to post
Share on other sites
HI
They are non-static-member functions, defined this way:

void CApp::key(void); for example.

What do I have to do to make it run??
Thanks!

[edited by - Canceler on July 27, 2003 11:01:58 AM]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!