Mouse Click Pointers

Anyone can help me in this?
How do I get my program to display a marking, e.g. a red dot, when my mouse clicks on a certain polygon in my program?

Do I have to work with pixel drawing? Is there any other way?


Do You mean 2D drawing or drawing on 3D polygons?

i have a cube with the 6 faces formed using flat 3D square polygons. I need to draw a point on the surface of the cube when the mouse clicks on it.


The solution to your problem is not so simple i’m afraid.First you’ll have to check if the click is on the cube and on which face.Then using to transform mouse position you find the click place in world coords.Using interpolation you must find the texcoord that’s lying on that point and finally you must load a new texture over the old one(called decal) by using a small quad which center is the texcoord you’ve found.