Results 1 to 4 of 4

Thread: glutMouseFunc Questions

  1. #1
    Member Newbie
    Join Date
    Jul 2002
    Posts
    43

    glutMouseFunc Questions

    I was curious if there is a way for opengl or glut to detect both the left and right button pressed at the same time? Also, I am curious if there is a way to detect the mouse wheel moving? I have done searches, and people seem to have accomplished this, but I can't find any way to do it. And The OpenGL Utility Toolkit (GLUT) Programming Interface API Version 3 for glutMouseFunc doesn't have any information about both mouse buttons or mouse wheel roll. Thanks for any help.

    -Drew

  2. #2
    Junior Member Newbie
    Join Date
    Sep 2002
    Posts
    1

    Re: glutMouseFunc Questions

    Yeah, actually, I had the same question. Anyon eknow the answer? It'd be a big help.
    (-VYDER-)

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

    Re: glutMouseFunc Questions

    The limited mouse and keyboard input is one drawbacks to GLUT. Something like SDL, would be the next step, with better mouse and keyboard input.

    Originally posted by jleffelm:
    I was curious if there is a way for opengl or glut to detect both the left and right button pressed at the same time? Also, I am curious if there is a way to detect the mouse wheel moving? I have done searches, and people seem to have accomplished this, but I can't find any way to do it. And The OpenGL Utility Toolkit (GLUT) Programming Interface API Version 3 for glutMouseFunc doesn't have any information about both mouse buttons or mouse wheel roll. Thanks for any help.

    -Drew


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

    Re: glutMouseFunc Questions

    For the two mouse button thing, just store a boolean for each mouse button. Set it to true when the button is pressed, and false when it's released. If both booleans are true, you know that both are pressed. This is how you would have to do it even if you were using the Win32 API as there is no event like WM_BOTH_BUTTONS_PRESSED.

    So far as the mouse wheel... not sure about that. Haven't ever tried to use that in Glut before, sorry.
    Deiussum
    Software Engineer and OpenGL enthusiast

Similar Threads

  1. glutMouseFunc
    By vivek vyas in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 05-26-2009, 01:26 AM
  2. glutMouseFunc
    By Zath in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 06-25-2006, 05:50 PM
  3. glutMouseFunc(mouse);
    By OGforever in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 11-12-2005, 03:20 AM
  4. Can't get GLUTMouseFunc to work
    By PilotC150 in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 01-31-2004, 05:51 PM
  5. glutMouseFunc on mac os x?
    By Elin in forum OpenGL: macOS
    Replies: 3
    Last Post: 05-23-2003, 06:27 AM

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