Jump to content
  • Advertisement


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


No "ColorkeyEnable" for Transparency on D3D8.0

This topic is 6197 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

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!