This one has been actually gleaned through a usenet post, but needs a wider coverage
As explained here, there is a clever bug in the parameter checking logic that results in the API soundly rejecting any combination of dwAlphaConst and dwAlphaConstBitDepth, unless dwAlphaConst == 1 << dwAlphaConstBitDepth. This is not fixed as of WM 6 AKU4. Interestingly enough the actual value of dwAlphaConstBitDepth seems to be ... ignored, once the parameter check is done. The bit depth used is always 8 bit.
Not using DDOVER_ALPHACONSTOVERRIDE gives you of course 100% (opaque overlay). In my experience anything under 5 (12.5%) is too small to be useful, but YMMV. Here is the code snippet:
if ( fUseAlpha ){ if ( dwAlpha > 8 ) // Bug in ddraw dwAlpha = 8; if ( dwAlpha < 8 ) { dwUpdateFlags |= DDOVER_ALPHACONSTOVERRIDE; ovfx.dwAlphaConst = 1 << dwAlpha; ovfx.dwAlphaConstBitDepth = dwAlpha; }}
Remember Me
Powered by: newtelligence dasBlog 1.8.5223.2
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.
© Copyright 2008, Alex Feinman