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: mousecursor dependent rotations

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2001
    Location
    germany
    Posts
    14

    mousecursor dependent rotations

    Hi!

    I'm working on the player controls for a first person view program. i use the mouse to set the view angles, i.e. look up/down if mouse moves up/down, look left/right if mouse moves left/right...BUT:
    some nasty flickering occurs when i rotate around...i've implemented all the stuff in the motion function (btw: i use the glut).

    any ideas ? thanks a lot,

  2. #2
    Member Regular Contributor
    Join Date
    Sep 2000
    Location
    Vancouver BC Canada
    Posts
    418

    Re: mousecursor dependent rotations

    Are you using a double buffered display?

  3. #3
    Junior Member Newbie
    Join Date
    Mar 2001
    Location
    germany
    Posts
    14

    Re: mousecursor dependent rotations

    Hi,

    yes, i use double buffering...and the polygon count is quite small (less than 200 polys).
    that nasty effect occurs only, when i rotate the scene
    via the mouse, because the inc/decrementation step
    for the angles is 2.5 units.....suppose that i make
    a very small move with the mouse (say, about 2-3 pixels), then the scene rotates of course about 2.5 degrees, which produces that effect...
    sure, i can reduce that 2.5 units to some smaller value, but then i have to move the mouse quite long...

    frankly said, i just want to create such smooth player controls as for example, quake has them...

    thanks,
    walantis

  4. #4
    Junior Member Newbie
    Join Date
    Mar 2001
    Location
    germany
    Posts
    14

    Re: mousecursor dependent rotations

    ok, i've solved the problem

    i took a look into the quake sources and replaced the
    glut with basic xlib calls (i had to grad the mouse pointer, disable the mouse events, calculated the coordinates, and reenabled the events).

    i think that the glut is not very good for realtime apps (like games).

    cheers

  5. #5
    Junior Member Regular Contributor
    Join Date
    Sep 2000
    Posts
    139

    Re: mousecursor dependent rotations

    Walantis, I need to do what you did. Could you let me see some code or direct me to the quake source.

Posting Permissions

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