views:

141

answers:

2

I currently have a game written using the Android canvas. It is completely 2D, and I draw bitmaps as sprites on the canvas, and it technically works, but I have a few features that I need to add that will require drawing many more bitmaps on the screen, and there will be a lot more movement.

The app needs more power.

What is the best way to go from this method of drawing Bitmaps on a canvas to using OpenGL so I can draw them faster?

A: 

Explaining here the complete way is not a good idea, so you will want to see the code by your self: http://is.gd/cQvQy This is the fastest way I know... run that sample application and you will see it's really fast.

Cristian
[Unshortened URL](http://code.google.com/p/apps-for-android/source/browse/#svn/trunk/SpriteMethodTest/src/com/android/spritemethodtest)
genpfault
Ups... you are right... I'll write it unshortened the next time.
Cristian
A: 

There are a couple platforms out there in the works for making 2d open gl games: http://www.rokonandroid.com/

http://www.andengine.org/

Unfortunately neither is as well developed as it's iPhone equivalents (cocos2d-iphone), but they will help you get off the ground faster than trying to interface with openGL right off the bat yourself.

peter