Archived

This topic is now archived and is closed to further replies.

No "ColorkeyEnable" for Transparency on D3D8.0

This topic is 5977 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

There is a quite convenient functions to set background of texture become transparent on D3D7.0 by setting IDirectDrawSurface7::SetColorKey and lpDev7->SetRenderState(D3DRENDERSTATE_COLORKEYENABLE, TRUE), but I can''t find the same parameter, "D3DRENDERSTATE_COLORKEYENABLE", of lpDev8->SetRenderState on D3D8.0, so it means this function is disable to let certain color of texture become transparent, right? Is there any alternative function to do? Can "ALPHATESTENABLE" , "ALPHAREF" AND "ALPHAFUNC" do the same thing? I will try later. Thanks for any suggestion! Roy

Share this post


Link to post
Share on other sites
ALPHATEST is absolutely the way to go!.

Some cards never really did colour keys anyway!, their drivers faked it using alphatest (which confused matters if you wanted to use colour keyed textures with alpha).

AlphaTest is the recommendation from the hardware manufacturers. 2D features aren''t what sells video cards - they concentrate all new development and testing on the 3D side of their hardware nowadays (one of the major reasons for DDraw being downgraded).

--
Simon O''''Connor
Creative Asylum Ltd
www.creative-asylum.com

Share this post


Link to post
Share on other sites