Jump to content
  • Advertisement
Sign in to follow this  

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

Anyone knows how to make this: When i Click on Quad with texture it will be do some instructions (in OpenGL with glut) Maybe some tutorials ... Please reply.

Share this post


Link to post
Share on other sites
Advertisement
The first result from google "glut mouse handling" : here.

Combine that with simple square collision detection.

Share this post


Link to post
Share on other sites
I will try it later because i m going to make some songs in my studio
But thanks
It should help me like I see

Share this post


Link to post
Share on other sites
I dont know where is a problem i made a class where i declareted function for
glutMouseFunc
When i call it i have error

error C2664: 'glutMouseFunc' : cannot convert parameter 1 from 'void (int,int,int,int)' to 'void (__cdecl *)(int,int,int,int)'

but when i make it not in class but structural everything is OK


Share this post


Link to post
Share on other sites
Let us see your code.

You may have to write your function like so:


extern "C" myMouseFunc( /* params */ )
{
// stuff
}

glutMouseFunc( &myMouseFunc );

Edit:

Quote:

but when i make it not in class but structural everything is OK


Yes, functions in classes are very different to normal functions, the "this" pointer needs to be passed, and how it is passed can vary with compiler.

Share this post


Link to post
Share on other sites
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!