-
2d lighting needed
Anyone know of good libraries/apis/algorithms for (dynamic) lighting/shadows using C++?
All I'm basically looking for is something that will work for a top down game with lights and objects in one plane although a more elaborate solution with extras is also welcome. Something like this would be nice
http://www.youtube.com/watch?v=8jveziFLHyQ
-
Re: 2d lighting needed
In order to achieve that sort of effect, you'll need 3D geometry and lights in 3D space, but you can keep it simple: maybe the floor is at z=0 and the walls rise up to z=1, or something equally straightforward.
In order to get a 2D appearance, simply use glOrtho() to set up your projection matrix.
OpenGL does not directly support shadows, but there are some techniques for generating them:
http://www.opengl.org/resources/code...rts/index.html