|
-
[C++][Alchemy][F10]Faster ways to clear a bitmap?
Not sure where to put this question as it relates to Alchemy...
I'm making a game which does all the rendering in C++, and passes as an address in memory to be created as a BitmapData from a Byte Array in Flash.
What I'm working on now is creating my own semi BitmapData class in C++. I'm working on a similar fillRect method like the one in the AS3 BitmapData class.
I want to know if there is a fast way of setting every single pixel to a certain color instead of going through every single pixel and setting the color in a while loop. Maybe some sort of trick perhaps?
I did tests with a 500 by 500 Bitmap, and using C++, in Flash 10, using my loop method, is quicker than the AS3 alternative, but I still want to know if there's a better way.
Basically, is there a better way to clear an array of pixels in a Bitmap to one color without having to loop through each pixel?
Anyone know how AS3 runs their fillRect method behind the scenes?
Thanks!
-TariqM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|