Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
dynamic texture? – ratchet freak Jan 29 '13 at 18:48
I'm unfamiliar with dynamic texturing, but preliminary research suggests it's not what I have in mind. The images I wish to project will be known prior to run-time, but the surface the images will be projected onto will be variable. – robert.ecot Jan 29 '13 at 19:02
up vote 3 down vote accepted

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.

share|improve this answer
Perfect, thank you! – robert.ecot Jan 29 '13 at 19:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.