How do you create a billboard in OpenGL ES?
Does anyone know how to create a billboard in OpenGL ES for the iPhone? I been looking for a tutorial but they seem non existent. I know how to create normal objects etc and apply a texture to it, but am looking to have walls with photos on them in my game.
Update: So what I am looking for is the best way to put a photo quality image that could be any size in to 3D world. I believe textures have to be certain sizes etc (128 * 128, 256 * 256 or 128 * 256 (are they square numbers?). I have seen examp开发者_如何学Pythonles of this in PhotoCastle3D and 3D Gallery)
2nd Part to this would be displaying this as a billboard that always face forward, good example would be for trees or bushes in a game. Thank you all for some good info, will go investigating.
If the billboard is not a component of the texture on the wall, but rather a separate object in the 3d view that is placed very closely to the wall, check out polygon offset. It's should be available in opengl-es. http://www.opengl.org/sdk/docs/man/xhtml/glPolygonOffset.xml
Basically its a quick way to resolve z-fighting between polygons, if their vertices both try to occupy the same place in the z buffer.
Here is a tutorial that may be helpful:
http://library.developer.nokia.com/topic/S60_5th_Edition_Cpp_Developers_Library/GUID-441D327D-D737-42A2-BCEA-FE89FBCA2F35/OpenGLEx/Billboard/doc/index.html
精彩评论