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 2 of 2

Thread: Adding new image when mouse pressed

  1. #1
    Junior Member Newbie
    Join Date
    Sep 2004
    Posts
    1

    Adding new image when mouse pressed

    Hi,
    I have mouse function and it works. Right now, when i press the mouse, the image is displayed on the spot where the mouse is pressed. However, when the mouse is pressed at the other point, the image is redisplay at that new position. I'm wondering who can tell me what function i can use to make the image not moved and push it into some sorta array list and memorize it and then new mouse position will display the second image.
    Thanks!

  2. #2
    Super Moderator OpenGL Guru dorbie's Avatar
    Join Date
    Jul 2000
    Location
    Bay Area, CA, USA
    Posts
    4,388

    Re: Adding new image when mouse pressed

    Go look at the code to position and draw the image & duplicate it.

    The only OpenGL part that might be applicable is the use of glPushMatrix and glPopMatrix calls around each translate and draw call for the images, unless the code uses glRasterPos to position the image in which case you don't even have that excuse.

    Your question is really basic, it's barely an OpenGL question and is more of a very, very basic programming question. Please look at your code and have a think about this before asking an OpenGL specific question. Even a question that asks something about the operation of rudimentary OpenGL drawing code would be more appropriate than a question that suggests you need to read the code a bit more thoroughly before posting.

Posting Permissions

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