Advertisement

Mouse dragging?

Started by September 13, 2000 08:47 AM
3 comments, last by ogl 24 years, 5 months ago
How do you drag and move objects with the mouse in opengl?
You just use the feedback buffer
(you can find me on IRC : #opengl on undernet)
Advertisement
If you didn''t understand that, then I think you could try this way... If you recieve a mousedown msg, then enable some variable that increments or decrements the x,y values of the object you want to move according to the position of the mouse at the time of the click and the time of the redraw. Then when you get a mouseup msg, stop moving the object. It works in theory, anyways, you''ll have to figure out the specifics of the code. But that''s what we''re here for, right? Not to feed people code, but to provide them with useful tips on how to "feed" themselves code. If ya catch my meaning.
S.
nah mate feedback buffers for someit else, u need to use the selection mechanisism?
you might also want to take a look at gluUnProject().

This topic is closed to new replies.

Advertisement