|
-
April 25th, 2010, 08:57 PM
#1
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
Last edited by Jarwulf; April 25th, 2010 at 09:09 PM.
-
April 25th, 2010, 09:21 PM
#2
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
Last edited by Lindley; April 25th, 2010 at 09:24 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|