Rendering 2D sprites in a 3D world?

后端 未结 7 1216
情深已故
情深已故 2021-01-03 01:17

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 weapo

7条回答
  •  天涯浪人
    2021-01-03 01:45

    In 3D terms, this is called a "billboard". A billboard is completely flat 2D plane with a texture on it and it always faces the camera.

    See here for a pure OpenGL implementation: http://nehe.gamedev.net/data/articles/article.asp?article=19

    Just about any 3D engine should be able to do them by default. Ogre3D can do it, for instance.

提交回复
热议问题