direct3d example texture NOT actually transparent?

DLL Edition of the F-IN-BOX
enry2
Posts: 2
Joined: Mon Apr 14, 2008 5:07 pm

direct3d example texture NOT actually transparent?

Postby enry2 » Mon Apr 14, 2008 5:25 pm

Hi,

Your Direct3D flash texture example does not seem to produce a texture with alpha. For me, this totally defeats the purpose of using directx.

Please advise if there's anything special that needs to be done to actually make the texture transparent. Obviously the boolean is set to TRUE, thus creating the FPC window with WS_EX_LAYERED.

The D3D texture is A8R8G8B8, so it can carry an alpha.

BITMAP.bmBitsPixel is 32, so there is an alpha channel in the source.

Looking at BITMAP.bmBits, I see that the alpha (fourth byte in each quad, on LSB architecture) is correct, that is to say: I put a square with 50% alpha, and I see 0x7f as expected.

Yes, I am using
d3ddev->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE);
d3ddev->SetRenderState(D3DRS_SRCBLEND,D3DBLEND_SRCALPHA);//alpha
d3ddev->SetRenderState(D3DRS_DESTBLEND,D3DBLEND_INVSRCALPHA);//alpha


So what gives?

TIA.

Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Postby Softanics » Mon Apr 14, 2008 6:26 pm

Thank you for your question.

So, as soon I understand, it gets bitmaps with alpha correctly but directx doesn't seem to render a texture right?
Best regards, Artem A. Razin,
F-IN-BOX support
Ask your question here: http://www.f-in-box.com/support.html

enry2
Posts: 2
Joined: Mon Apr 14, 2008 5:07 pm

Postby enry2 » Mon Apr 14, 2008 7:07 pm

DirectX does not seem to render the texture transparency.

The resulting object is completely opaque, even where it should be transparent.


Return to “DLL Edition”

Who is online

Users browsing this forum: No registered users and 12 guests

cron