PDA

View Full Version : How to render 2d sprites in a 3d world?



xman84
11-25-2010, 06:27 PM
In opengl how do I render 2d sprites in opengl given that I have a png of the sprite? See images as an example of the effect I'd like to achieve. Also I would like to overlay weapons on the screen like the rifle in the bottom image. Does anyone know how I would achieve the two effects? Any help is greatly achieved.

http://i.imgur.com/27kSB.jpg
http://i.i.com.com/cnwk.1d/i/tim/20090213/Foreman_10997164_8bit_killer_04.gif

M//Hax
11-26-2010, 12:11 PM
I hope this link can help you :

http://basic4gl.wikispaces.com/2D+Drawing+in+OpenGL