Well, the title explains what I need to know So if I have a basic lwjgl/opengl 3D world with some entities which can be some NPC's or other game stuff. And lets say I want to make floating names, test if object is seen by camera etc. I need to know exact 2D point coordinates when I have 3D point location data.

This is how I did 3D picking (needs to be "reversed"):Please tell me if there's a better way.

There's an infinite set of points that all map to a given screen position and they form a line. Taking the point on the near clipping plane and any 'forward' from that (say the far clipping plane) will give you two points on the line in the direction into the scene. Cast the ray thorough the scene to check stuff. There should be plenty of reference code available to do this.

1. Calculate the world space position of the name tag from the object's position.2. Manually do the matrix transformations on the CPU.3. You now have a (normalized) screen coordinate and a depth for the name tag.4. Draw text centered at those screen coordinates at the calculated depth with both the modelview and projection matrices set to identity (our coordinates are already transformed).

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org