Game Development Stack Exchange is a question and answer site for professional and independent game developers. 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

What is the correct, or most elegant, way to manage cameras in large game engines? Or should I ask, how does everybody else do it?

The methods I can think of are:

Binding cameras straight to the engine; if someone needs to render something, they bind their own camera to the graphics engine which is in use until another camera is bound.

A camera stack; a small task can push its own camera onto the stack, and pop it off at the end to return to the "main" camera.

Attaching a camera to a shader; Every shader has exactly one camera bound to it, and when the shader is used, that camera is set by the engine when the shader is in use. This allows me to implement a bunch of optimizations on the engine side.

Are there other ways to do it?

share|improve this question
up vote 2 down vote accepted

Real-Time Cameras by Mark Haigh-Hutchinson covers just about everything there is to know about cameras. (Sorry I can't give a more direct reference to the issues you ask about, but my copy is across an ocean right now, I think.)

share|improve this answer

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.