No "ColorkeyEnable" for Transparency on D3D8.0

Started by
0 comments, last by RoyHsu2001 22 years, 8 months ago
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
Advertisement
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

Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

This topic is closed to new replies.

Advertisement