Jump to content
  • Advertisement
Sign in to follow this  
charsi

rubber-band method

This topic is 4974 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

what is rubber-band method?any example for this??what's its relation with the mouse motion function? thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by charsi
what is rubber-band method?any example for this??what's its relation with the mouse motion function?


you forgot "what's its relation with opengl?".

which context, where did you hear it and what do you want to achieve with it?

Share this post


Link to post
Share on other sites
i guess he mean how poligons is usually edited using mouse by dragging lines and making vertices like it's rubber line. Can nor explain any better. Don't see how it can be OGL-related.

Share this post


Link to post
Share on other sites
i use this method to draw an shape where the size of the shape chages when i move the mouse around until i release the mouse.it has to do with the mouse function and mouse motion function.

Share this post


Link to post
Share on other sites
so it's question about glut, glaux, or some other opengl helper lib.. opengl itself work with screen only.

if it's question "now to make 'rubber band'", it's related to user interface programming.
and by rubber band you mean that thing, you move mouse and one or more lines is drawn from somewhere to cursor position?(and usually that mode is ended by releasing mouse key). You need to just do it, there's no special function for that.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Rubber-banding is typically a term applied to the interactive technique of stretching a selection. For a specific example, on your Windows desktop, press and hold your mouse button and drag the cursor. A rectangle will follow your cursor as you drag it. That is rubber-banding.

In the old days, this was done using the XOR operation on the pixels with some color, then XOR the value again and you get the original pixel back. This prevented the main content of the window from being redrawn on every mouse movement, which helped interactivity greatly.

This can be achieved in OpenGL by using glLogicOp(GL_XOR).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!