Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
102 user(s) are online (63 user(s) are browsing Forums)

Members: 1
Guests: 101

nbache, more...

Headlines

 
  Register To Post  

CompositeTags and simple transparency problem
Not too shy to talk
Not too shy to talk


See User information
Hello

I have a very simple problem : I want to apply an uniform alpha value to a bitmap that is NOT transparent ( A=255 for all pixels)

Is it not possible ? or am I doing it wrong ?
[I am using VertexArray because the "sprite" may be flipped]

Thanks

Alain Thellier


if(DoBlend)
{

SrcA=((float)G->Blend.B.RGBA[3])/255.0;
SrcAfix=(SrcA*65536.0);
DstA=1.0-SrcA;
DstAfix=(DstA*65536.0);

CompMode=COMPOSITE_Src_Over_Dest;
flags= COMPFLAG_SrcFilter|COMPFLAG_IgnoreDestAlpha;

error = CompositeTags(CompMode,
srcbm,dstbm,
COMPTAG_VertexArray, P,
COMPTAG_VertexFormat,COMPVF_STW0_Present,
COMPTAG_NumTriangles,2,
COMPTAG_DestX,sx,
COMPTAG_DestY,sy,
COMPTAG_SrcAlpha ,SrcAfix,
COMPTAG_DestAlpha ,DstAfix,
COMPTAG_DestWidth ,slarge,
COMPTAG_DestHeight,shigh,
COMPTAG_Flags, flags ,
TAG_DONE);

}

Go to top
Re: CompositeTags and simple transparency problem
Home away from home
Home away from home


See User information
@thellier

COMPFLAG_SrcAlphaOverride will do what you want.

Hans

http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more.
https://keasigmadelta.com/ - more of my work
Go to top
Re: CompositeTags and simple transparency problem
Not too shy to talk
Not too shy to talk


See User information
Hello

Thanks for your help Hans

But it dont seems to works also with this fix...
Are you sure COMPTAG_VertexArray COMPTAG_SrcAlpha COMPFLAG_SrcAlphaOverride can works together ?

I mean perhaps COMPTAG_SrcAlpha COMPFLAG_SrcAlphaOverride only works with rectangular blit ? no ?


Alain

Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project