View Full Version : Mouse Click Pointers
05-09-2003, 07:30 PM
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?
05-10-2003, 01:46 AM
Do You mean 2D drawing or drawing on 3D polygons?
05-10-2003, 02:19 AM
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.
05-10-2003, 03:47 AM
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.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.