This site is no longer active and is available for archival purposes only. Registration and login is disabled.

alpha blending


alpha blending

Postby PringlesOriginal » Aug 18, 2004 @ 1:59am

how can i do alpha blending with pocketfrog(0.8)? I want to use the .raw files for masking....

anybody got any suggestion?
PringlesOriginal
pm Member
 
Posts: 8
Joined: Aug 1, 2004 @ 9:01pm


Postby Conan » Aug 18, 2004 @ 7:22am

What is Best in Life ?
User avatar
Conan
pm Member
 
Posts: 1309
Joined: Dec 24, 2001 @ 5:16am
Location: the Shades, Ankh-Morpock


Postby fast_rx » Aug 18, 2004 @ 2:49pm

User avatar
fast_rx
pm Member
 
Posts: 660
Joined: Jun 10, 2003 @ 4:24pm


Postby jaguard » Aug 18, 2004 @ 4:15pm

jaguard
pm Member
 
Posts: 230
Joined: Mar 2, 2004 @ 6:45pm


Postby fast_rx » Aug 18, 2004 @ 4:52pm

User avatar
fast_rx
pm Member
 
Posts: 660
Joined: Jun 10, 2003 @ 4:24pm


Postby Kzinti » Aug 18, 2004 @ 5:13pm

Kzinti
pm Member
 
Posts: 3238
Joined: Jan 13, 2002 @ 5:23am


Postby fast_rx » Aug 18, 2004 @ 6:33pm

Do you feel that using a whole 16 byte per pixel surface as an alpha mask is acceptable? My code only uses the green value as the alpha...

It seemed the easiest to get what I wanted at the time.

I just came across an article at codeproject that is using the ARGB formatted images to have full alpha ( http://www.codeproject.com/useritems/Tr ... onDemo.asp ).
That would be nice to have, but since all of pocketfrog is 565 format surfaces, I assume it would be a lot of coding to support something like that.
User avatar
fast_rx
pm Member
 
Posts: 660
Joined: Jun 10, 2003 @ 4:24pm


Postby Kzinti » Aug 18, 2004 @ 6:39pm

Kzinti
pm Member
 
Posts: 3238
Joined: Jan 13, 2002 @ 5:23am


Postby fast_rx » Aug 19, 2004 @ 5:26am

Ok... Since I needed to make the move to PF0.8 anyway, I went ahead and made the modifications. Here's a zip with the modified files, plus a demo app of how it can be used.

The one thing I probably could have done was to figure out how to write this in the algo2d.h file instead of repeating a lot of code. Also, there is just an empty function for the cases involving GenericRaster2D, since I don't know exactly what you'd do with that.

I also notice that the 'assert()' parts are missing. I assume they aren't needed and removed them from the additions as well.

Note: The img source and alpha source MUST be the same width, or you'll get strange things.

I also have written Additive and Subtractive blit functions as well that are good for explosions and things - and you don't have the slowdown of using a custom shader. I can also 'donate' these as well, but I thought I'd wait and hear what comments are made - especially with reguards to putting the stuff in algo2d.h


Maybe my name will be forever remembered in the pocketfrog source code like Frank Z's... :D
Attachments
AlphaMods.zip
(63.94 KiB) Downloaded 640 times
User avatar
fast_rx
pm Member
 
Posts: 660
Joined: Jun 10, 2003 @ 4:24pm


Postby fzammetti » Aug 19, 2004 @ 5:50am

...and so I said to Mr. Gates: "$640 billion should be enough for anyone!"
User avatar
fzammetti
pm Insider
 
Posts: 1496
Joined: Jun 4, 2002 @ 6:21pm
Location: Omnytex Technologies


Postby Conan » Aug 19, 2004 @ 7:01am

What is Best in Life ?
User avatar
Conan
pm Member
 
Posts: 1309
Joined: Dec 24, 2001 @ 5:16am
Location: the Shades, Ankh-Morpock


Postby jaguard » Aug 19, 2004 @ 8:15am

jaguard
pm Member
 
Posts: 230
Joined: Mar 2, 2004 @ 6:45pm


Postby jaguard » Aug 19, 2004 @ 8:41am

jaguard
pm Member
 
Posts: 230
Joined: Mar 2, 2004 @ 6:45pm


Feedback on Turbo Reaction

Postby Conan » Aug 19, 2004 @ 2:06pm

1. The red text is vey hard to read on my Dell Axim.
2. Fatal Application Error on exiting the game 2 times
3. The big icon is just 4 corners with not much else?
Plays nice & fast. Have not tried with sound/music yet as I'm at work.
What is Best in Life ?
User avatar
Conan
pm Member
 
Posts: 1309
Joined: Dec 24, 2001 @ 5:16am
Location: the Shades, Ankh-Morpock


Postby fast_rx » Aug 19, 2004 @ 3:07pm

User avatar
fast_rx
pm Member
 
Posts: 660
Joined: Jun 10, 2003 @ 4:24pm


Next

Return to PocketFrog & PocketHAL


Sort


Forum Description

SDKs for fast and robust device-independent access to Pocket PC display hardware.

Moderators:

sponge, Kzinti

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum