Get Bitmap from Canvas

Problems with Canvas, OpenGL, etc...

Get Bitmap from Canvas

Postby WWaldo » Sat Dec 18, 2010 7:23 pm

Hey everyone,

I have a quick question that I can't find the answer to in the API. I am creating a tile based game, and the way it draws everything now is through giant double for loop traversing my 2d array of tiles. It only draws what is supposed to be on screen, but I am looking for something more efficient than this.

The only thing that comes to mind when I think about it is somehow making what I printed into a bitmap of its own. I don't know if there is a way to do it, but I figured I would ask here.

Basically I just want to know if there is a way to print all of my tiles once, then convert the canvas into a bitmap, and use that instead. Also, if there is another way I am missing that could make this more efficient please let me know. Thanks in advance.

WWaldo
WWaldo
Experienced Developer
Experienced Developer
 
Posts: 58
Joined: Sun Feb 21, 2010 8:25 pm

Top

Return to Android 2D/3D Graphics - OpenGL Problems

Who is online

Users browsing this forum: Yahoo [Bot] and 4 guests