Jump to content
Search Community

BlitMask question

retropunk test
Moderator Tag

Recommended Posts

Hey there, I am wondering if I can use BlitMask for this idea.

 

I have a series of PNG files that when played in sequence is a 360 rotation of an engine. I have code that lets the user click and drag which plays the sequence forward/backward. It's basically a poor mans QTVR. So it doesn't scroll as much as it updates the rect with a new bitmap

 

I am creating another version for the iPad that uses copyPixels and cloning. It works great on the desktop but I was curious if BlitMask will do what I've described.

 

I am having memory issues so I am exploring alternatives to my own copyPixels and cloning solutions.

 

Thanks!

- Patrick

Link to comment
Share on other sites

if you can manage to get all the frames of your animation into single bitmap I imagine BlitMask could very easily do the heavy lifting for you.

you just have to configure your dragger to offset the x position of the BlitMask's target.

 

 

I'd say give it a try. Keep in mind that although BlitMask performs great there is no way around the overhead of keeping the pixel data in memory.

Link to comment
Share on other sites

Thanks Carl.

 

Using copyPixels is great but the Memory thing is baffling. I can destroy the bitmaps from memory but the memory seems to increase even after I destroy the bitmaps.

For example:

1. Flash starts and memory is at 80

2. I load 10 bitmaps and use copyPixels. the memory is at 200

3. I destroy all 10 bitmaps and the memory is 90

4. I load 10 bitmaps again and use copyPixels. the memory is at 220

etc

 

Not sure how to pin pint the leak. Might be a garbage collection thing

 

Thanks for the insight though

 

rock on

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...