Dirty Rect Algo at work!!!

posted in Yar
Published February 28, 2005
Advertisement


Need I really say anything for this horrid picture??

-=EDIT=-

Getting there... My current problem is that I need to take a portion of the bufferstrategy and copy it to a BufferedImage. The only problem is that I don't think that it is possible...

You can see two 'buffers'(really the same buffer, just copied to a different location and back again). The other problem is that I don't know how to change a color to alpha... anyhelp on that?
Previous Entry Verts as a seperate class
Next Entry Mario Brothers
0 likes 3 comments

Comments

Rob Loach
What happen? Somebody set you up the bomb?
February 28, 2005 10:22 PM
H_o_p_s
Trying to get the dang algo to work... getting better :)
February 28, 2005 10:27 PM
stormrunner
Quote:Original post by H_o_p_s
My current problem is that I need to take a portion of the bufferstrategy and copy it to a BufferedImage. The only problem is that I don't think that it is possible...

Well, that depends. If - as is most often the case - your BufferStrategy is created (and accessed) using a VolatileImage, then it's a piece of caek, in a manner of speaking. It all depends on whether you can actually access it. If so, then you can use VolatileImage.getSnapshot() (note - you need a variable name, it's not a static method), which returns a BufferedImage of the contents on the VolatileImage itself. At least that what it seems to imply ... and then you do whatever it is that needs to be done.

Disclaimer : I haven't actually tried this, as it's been awhile since I've played with Java2D. I'm hoping to get back to it in the near future.

On a related note, your demo is looking very nice. Keep up the good work. [smile]
March 01, 2005 12:12 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement

Latest Entries

!!!!!!!

671 views

MIDI Keyboard v1.7

1552 views

Yar.

1222 views

Orchestra Recording

1336 views

MIDI Keyboard v1.5

1471 views

Registration

1337 views

Ahhh!!!

1102 views

Um... yeah...

1088 views
Advertisement