Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 5 of 5

Thread: Using the Mouse

  1. #1
    Junior Member Newbie
    Join Date
    Aug 2001
    Location
    UK
    Posts
    10

    Using the Mouse

    I have a float called "angleX" which I want to change with the mouse.
    What I need to do is change this angle by clicking and holding the mouse button down then dragging from left to right. The more you drag, the more the angle will increase or decrease.
    Anyone know what I need to do and how? At present I have a

    glutMouseFunc(command_mouse);

    line in main() and a

    void command_mouse(int button, int state, int x, int y)

    function. It only seems to recognise the first click though and not that it's still held down and the mouse is moving.

    Cheers

  2. #2
    Intern Contributor
    Join Date
    Apr 2000
    Location
    Salt Lake City, UT
    Posts
    55

    Re: Using the Mouse

    Check out glutMotionFunc()

  3. #3
    Junior Member Newbie
    Join Date
    Aug 2001
    Location
    UK
    Posts
    10

    Re: Using the Mouse

    Where do I get information on this function?

  4. #4
    Junior Member Newbie
    Join Date
    Aug 2001
    Posts
    21

    Re: Using the Mouse

    - rael

  5. #5
    Junior Member Newbie
    Join Date
    Aug 2001
    Location
    UK
    Posts
    10

    Re: Using the Mouse

    Cheers guys that's great

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •