Handling cameras in a large scale game engine

Posted by Hannesh on Game Development See other posts from Game Development or by Hannesh
Published on 2011-02-20T00:26:36Z Indexed on 2011/02/20 7:33 UTC
Read the original article Hit count: 274

Filed under:
|
|
|

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?

© Game Development or respective owner

Related posts about 3d

Related posts about engine