wined3d: Added separate alpha blending renderstates
Vitaliy Margolen
wine-devel at kievinfo.com
Wed May 24 00:40:11 CDT 2006
Tuesday, May 23, 2006, 10:17:51 PM, Jacob Peters wrote:
> ChangeLog: Implemented separate alpha blending renderstates
>
> I reworked my previous patch and I'm pretty sure it'll work now.
You sure in terms you tested this with some game/demo/test program?
Or that the code just looks right?
Few suggestions:
> + if (This->separateAlphaBlendEnabled) {
> + TRACE("glBlendFuncSeparateEXT RGBSrc=%x, RGBDst=%x AlphaSrc=%x AlphaDst=%x\n", This->srcBlend, This->dstBlend, This->srcBlendAlpha, This->dstBlendAlpha);
Please use 4 spaces indent not 8. Also don't make such huge lines.
Something like this looks much better:
+ if (This->separateAlphaBlendEnabled) {
+ TRACE("glBlendFuncSeparateEXT RGBSrc=%x, RGBDst=%x AlphaSrc=%x AlphaDst=%x\n",
+ This->srcBlend, This->dstBlend, This->srcBlendAlpha, This->dstBlendAlpha);
> + if(Value && GL_SUPPORT(EXT_BLEND_EQUATION_SEPARATE) && GL_SUPPORT(EXT_BLEND_FUNC_SEPARATE)) This->separateAlphaBlendEnabled = TRUE;
> + else This->separateAlphaBlendEnabled = FALSE;
This would look better this way:
+ This->separateAlphaBlendEnabled = Value &&
+ GL_SUPPORT(EXT_BLEND_EQUATION_SEPARATE) &&
+ GL_SUPPORT(EXT_BLEND_FUNC_SEPARATE);
> + UINT blendEquation;
> + UINT blendEquationAlpha
Don't add to the object variables that are useless outside the IWineD3DDeviceImpl_SetRenderState.
Vitaliy Margolen
More information about the wine-devel
mailing list