For one of my new games I'm using OpenGL ES since it has multiple enemies and bullets, etc. How do you draw images on the screen with Opengl ES? I have a player.png
image that is a 48x48 pixel image; how would I draw that on the screen?
views:
182answers:
1
A:
The basic answer is that you create a quad out of two triangles and draw that "camera facing" or in 2D mode on the screen.
In the iPhone example of OpenGL ES (the rocket ship one) you can see the Texture2D class which handles loading png's and displaying them. It's simple, but works.
But I would suggest you take a look at cocos2d iPhone. This framework handles a lot of this stuff for you and lets you focus a lot more on your game: http://code.google.com/p/cocos2d-iphone/
You might also look at GameSalad for a non-programmery way of making simple iPhone games: http://gamesalad.com/
David Whatley
2010-01-01 19:30:50
well now i have it on the screen but when the view moves to much (i have the player.png following the view) eventually the player starts disappearing
techy
2010-01-03 16:59:03