iam writing aprogram for which i have a line and when i mouse click ona certain point i want the coordinates of that point to be displayed at that position itself in the scene. how to do it??
any code would be highly useful??
iam using Java and GL4java as the opengl binding for java.
thankx in advance…
Your question is a little cloudy to me. However,
I can see at least 3 possibilities.
Project your 3D point onto the screen using gluProject (or your own creation), and draw your text at the resulting position on the screen.
Same as one, but draw 3D text instead.
Draw your 2D text in the world using a sprite–either as individual quads or a single billboard.
Draw your 3D text in the world using polygons.
Woops, that was 4.