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

Opacity w/Transparency Map??


Opacity w/Transparency Map??

Postby capesdev » Mar 27, 2002 @ 5:22am

Is there any way to plot a surface with a global opacity AND a alpha level opacity ? In other words, I have a sprite that has an alpha map I use to call AlphaBltFast(). However, I want to plot that sprite at increasing levels of fading..to make a 'trail' effect. There seems to be no opacity flag for any of the AlphaBlt*() routines. Would I have to modify the alpha map prior to each call to make this effect?? If so... Johan, if you're reading this thread, pleeeeeaaaasssssse add the dwOpacity multiplier to your AlphaBlt() routines in a future release :)

Any suggestions ??
Thanks.
capesdev
 


One solution

Postby capesdev » Mar 27, 2002 @ 5:51am

I figured I can make a copy of the alpha map and FillRect() it with black color at varying level to produce the effect...I think I'm losing cycles over just multiplying the alpha and dwOpacity values together tho.
capesdev
 


Postby Johan » Mar 27, 2002 @ 1:27pm

Hi,

I'll add it to my list for 1.1... :)

Please note though that AlphaBlt is way slower than plain BltFast, since each non-masked pixel have to be multiplied six times (since you don't have the quick 50% opacity mode available).

/Johan
User avatar
Johan
pm Member
 
Posts: 1843
Joined: Jan 12, 2002 @ 12:38pm
Location: Sweden


Postby capesdev » Mar 27, 2002 @ 4:06pm

Johan-
Thanks for the reply. I understand that AlphaBltFast() is slower than BltFast() but I do not know any other way to achieve the effect of per pixel alpha bledning. My game will not involve a large # of surfaces being blitted so I think I'll be ok using a lot of AlphaBltFast() calls. So far, your routines are proving more than fast enought :)

Regards,
Jeff.
capesdev
 


Postby billcow » Mar 27, 2002 @ 7:16pm

Most people don't know that "A highly technical term" is actually a highly technical term used to describe something that doesn't mean anything
User avatar
billcow
pm Member
 
Posts: 81
Joined: Jan 6, 2002 @ 12:22am
Location: Dryden, NY


Postby Johan » Mar 27, 2002 @ 9:28pm

User avatar
Johan
pm Member
 
Posts: 1843
Joined: Jan 12, 2002 @ 12:38pm
Location: Sweden


Return to GapiDraw


Sort


Forum Description

The Cross-platform Graphics SDK for Palms, Pocket PCs, Symbian Devices, and Stationary PCs.

Moderators:

sponge, Johan

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

cron