how to know the position

Started by cvcMateu, April 29, 2008, 15:08:00

Previous topic - Next topic

cvcMateu

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!

Fool Running

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.
Programmers will, one day, rule the world... and the world won't notice until its too late.Just testing the marquee option ;D