7

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?

genpfault
  • 51,148
  • 11
  • 85
  • 139
Ben Mc
  • 2,038
  • 6
  • 30
  • 37
  • 2
    I would like to add that using libgdx has made it possible to work with my games in a very similar way to working with the Canvas yet I can utilize the full power of OpenGL ES. – Ben Mc Jul 05 '11 at 18:36

2 Answers2

2

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
  • 471
  • 5
  • 16
1

I think you can get good performance out of a canvas.. but it takes a lot of work..

if you start off with a good performance graphics library, then even if you get a lot of things wrong, you probably will still end up with good performance :) lol

there is a competition running for the fastest drawing library... libgdx is currently winning...

https://github.com/libgdx/libgdx/wiki/A-simple-game

hamish
  • 1,141
  • 1
  • 12
  • 21