Your program is very useful, but after compiling in my program, it warns that ¡°glutMouseFunc' : cannot convert parameter 1 from 'void (int,int,int,int)' to 'void (__cdecl *)(int,int,int,int)'¡±.In my program, I use functions not only from the ¡°glut¡± library, but also use ¡°gl¡± functions for initializing, using ¡°glutMouseFunc¡± and ¡°glutMotionFunc¡± only for the drawing tool. Is there something wrong? That is to say, whether I can use other functions for initializing without glut function? And I have another two questions, the first, whether ¡°glut¡± based on the message-response mechanism? I have read a text which says ¡°GLUT dose not support menu bar type function¡±, so I fear I can¡¯t use it in my program, because what I want to do is a drawing tool, I need a menu bar interface, which can be used applying to the user at will. The second , the common opengl programs what I saw are based on SDI in Visual C++, but once use ¡°glut¡± function, it seems that there must has a ¡°main¡± function and without the concept of ¡°class¡± , can you explain it to me? Thank you very much!!

nexusone

08-18-2003, 04:39 AM

GLUT is based around C and it for the most part simple way to setup openGL fast.

But using OpenGL has limitations, like no menu bar support and maybe the problem you are having with classes. I think someone has made a C++ type class for it, but don't remember.
Do a seach here on this forum, it has come up before.

If you need window menu bar's then you may want to look at using openGL with the Windows API.

If you want cross platform, there are a few API librarys that support menu functions like QT library, etc.

On the glut compiler error's and warnings, what OS are you using?, compiler?
Where the error's from my code, or code that you have created

[This message has been edited by nexusone (edited 08-18-2003).]

Deiussum

08-18-2003, 06:44 AM

Did you try to change the mousecall back to point to a member function of a class? If you do this, the member function will have to be static, which means that any member variables it uses will also need to be static, and making those member variables static will mean that every instance of that class will always have the same value for those members...

applehaha

08-18-2003, 10:08 PM

Originally posted by nexusone:
GLUT is based around C and it for the most part simple way to setup openGL fast.

But using OpenGL has limitations, like no menu bar support and maybe the problem you are having with classes. I think someone has made a C++ type class for it, but don't remember.
Do a seach here on this forum, it has come up before.

If you need window menu bar's then you may want to look at using openGL with the Windows API.

If you want cross platform, there are a few API librarys that support menu functions like QT library, etc.

On the glut compiler error's and warnings, what OS are you using?, compiler?
Where the error's from my code, or code that you have created

[This message has been edited by nexusone (edited 08-18-2003).]
Thank you very much!!