Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


GLUT Mouse Interaction


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 Corfe   Members   -  Reputation: 136

Like
Likes
Like

Posted 16 June 2001 - 03:37 PM

I''d like to get relative coordinates for the mouse each frame instead of absolute, as GLUT seems to give. The problem is that using the mouse for mouse look, when the mouse cursor reaches the edge of the screen, the camera won''t look in that direction any further, so I need a workaround. I''m trying to do this completely platform-independent, so somebody help me out please Thanks in advance! Hope this post wasn''t too unclear hehe

Sponsor:

#2 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 17 June 2001 - 06:12 AM

GLUT gives relative coordinates in respect to the window. After each reading and updating of your variables can you reset the pointer to the center. Take a look at NeHe tutorial 23 for an example.

#3 Corfe   Members   -  Reputation: 136

Like
Likes
Like

Posted 17 June 2001 - 08:20 AM

Thanks for the quick reply, but this isn''t quite what I''m looking for... I meant relative coordinates as in relative to the previous frame, not relative to the window. I would use Directinput, but I don''t want to use anything Win32-specific, I''m trying to be completely platform-independent, at least as much as possible. I know a simple SetCursorPos(x,y) would work for Windows, but I want it to be platform-independent, so I''m trying to avoid that. E.g. if you move the mouse left 2 pixels from the last frame, you would get (-2,0), as opposed to (468,234) or whatever the new cursor position is. The other thing that might help would be a setcursorpos() function equivalent in GLUT... thanks in advance, hope someone knows the answer.

#4 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 17 June 2001 - 08:26 AM

glutWarpPointer or similar.
Cool name sounds like Star Trek.

#5 Corfe   Members   -  Reputation: 136

Like
Likes
Like

Posted 17 June 2001 - 08:42 AM

Thanks a lot for your help, that''s exactly what I was looking for : )




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS