Results 1 to 5 of 5

Thread: nexusone

  1. #1
    Junior Member Newbie
    Join Date
    Aug 2003
    Posts
    11

    nexusone

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

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Jun 2000
    Location
    Gastonia, NC, USA
    Posts
    2,068

    Re: 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).]

  3. #3
    Senior Member OpenGL Pro
    Join Date
    Oct 2000
    Location
    Fargo, ND
    Posts
    1,753

    Re: nexusone

    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...
    Deiussum
    Software Engineer and OpenGL enthusiast

  4. #4
    Junior Member Newbie
    Join Date
    Aug 2003
    Posts
    11

    Re: nexusone

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

  5. #5
    Junior Member Newbie
    Join Date
    Aug 2003
    Posts
    11

    Re: nexusone

    Thank you for your reply!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean