OpenGL – Simulating a Projector in OpenGL

opengl

I wish to simulate a projector screen in OpenGL, where an image is truly being projected onto the wall in real time. By this I mean if an object were to get in between the projector and the wall, that portion of the image will appear on the obstructing object.

Is this functionality possible in OpenGL? And what technolgies/libraries can I implement to facilitate this development?

Best Answer

What you're looking for is projective texture mapping, for which there are many tutorials and which has been possible in all versions of OpenGL: SGI's sample code was written for OpenGL 1.0.

What you do is essentially apply a perspective transformation on the texture when you apply it to an arbitrary surface.

Related Topic