Adding new image when mouse pressed

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.

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.