Hello,

I generate a map/terrain; created with procedural content generation (on the
fly) and try it now to visualize on a canvas. This works fine but the
performance is pretty bad:

        for (int x = 0; x < _mapManager.WorldManager.Terrain.Width; x++) {
                                for (int y = 0; y < 
_mapManager.WorldManager.Terrain.Height; y++) {
                                        
                                        paint.Color = 
_mapManager.GetColorOfHeight(x,y);
                                        c.DrawPoint(x,y, paint);

In my example width/height is each of size 512 and this for loop takes a
couple of seconds on an Asus Transformer Prime tablet, which is
unacceptable...probably I have chosen not the smartest way to render such a
'map'...

Is there any more efficient way to draw the map?

Thanks guys for your help in advance!

--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/Performance-of-Canvas-DrawPoint-tp5644629p5644629.html
Sent from the Mono for Android mailing list archive at Nabble.com.
_______________________________________________
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to