OpenGL ES 2.0: Mixing 2D with 3D

Posted by Bunkai.Satori on Game Development See other posts from Game Development or by Bunkai.Satori
Published on 2011-04-29T20:55:15Z Indexed on 2012/07/10 15:26 UTC
Read the original article Hit count: 283

Filed under:

Is it possible to mix 2D and 3D graphics in a single OpenGL ES 2.0 game, please?

I have plenty of 2D graphics in my game. The 2D graphics is represented by two triangular polygons (making up a rectangle) with texture on them. I use orthographic matrix to render the whole scene.

However, I need to add some 3D effects into my game. Threfore, I wish to use perspective camera to render the meshes.

Is it possible to mix orthographic and perspective camera in one scene? If yes, is there going to be a large performance cost for this? Is there any recommended approach to do this effectively? I wil have 90% of 2D graphics and only 10% of 3D.

Target platform is OpenGL ES 2.0 (iOS, Android). I use C++ to develop.

Thank you.

© Game Development or respective owner

Related posts about opengl-es