LWJGL Forum

Programming => OpenGL => Topic started by: cvcMateu on April 29, 2008, 15:08:00

Title: how to know the position
Post by: cvcMateu on April 29, 2008, 15:08:00
I've an application that uses opengl (lwjgl).
In my application some figures are drawn. Is it possible to know which are the 'real' (from the canvas) position where a 3d object has been drawn.

As an example, imagine that you have a 3d scene. In the scene you have represented a TV. I have a software that can place a video given the cordinates where the video should be placed. Therefore I need to know where is the (2d) place where the Tv has been drawn.

Is it possible. If it is, how this can be achieved?

Thanks!
Title: Re: how to know the position
Post by: Fool Running on April 29, 2008, 17:28:19
A better way to do videos in 3D is to render the videos on a texture (replacing the contents each frame) and use the texture on an object (in this case the TV screen).

If that's not an option, I think GLU.gluProject() that does what you want.