gpt4 book ai didi

c++ - 'D3DRS_SEPARATEDESTALPHAENABLE' : undeclared identifier - even though it's mentioned in the DirectX comments?

转载 作者:行者123 更新时间:2023-11-30 04:40:32 30 4
gpt4 key购买 nike

在 _D3DRENDERSTATETYPE 结构的 d3d9types.h 中,最后 3 种类型是:

D3DRS_SRCBLENDALPHA             = 207,  /* SRC blend factor for the alpha channel when D3DRS_SEPARATEDESTALPHAENABLE is TRUE */
D3DRS_DESTBLENDALPHA = 208, /* DST blend factor for the alpha channel when D3DRS_SEPARATEDESTALPHAENABLE is TRUE */
D3DRS_BLENDOPALPHA = 209, /* Blending operation for the alpha channel when D3DRS_SEPARATEDESTALPHAENABLE is TRUE */

请注意,它提到如果“D3DRS_SEPARATEDESTALPHAENABLE 为 TRUE”,将使用这些,但是结构中没有任何 D3DRS_SEPARATEDESTALPHAENABLE。最接近的似乎是:“D3DRS_SEPARATEALPHABLENDENABLE”,但我完全不确定这是否是同一回事。

所以我只是想知道应该将最后三个渲染状态设置为 true 才能实际工作(如果有的话?),我强烈认为它是 D3DRS_SEPARATEALPHABLENDENABLE 但希望有人确认一下?

最佳答案

是的,D3DRS_SEPARATEALPHABLENDENABLE。貌似评论打错了。

来自 DXSDK:

D3DRS_SRCBLENDALPHA

One member of the D3DBLEND enumerated type. This value is ignored unless D3DRS_SEPARATEALPHABLENDENABLE is true. The default value is D3DBLEND_ONE.

D3DRS_DESTBLENDALPHA

One member of the D3DBLEND enumerated type. This value is ignored unless D3DRS_SEPARATEALPHABLENDENABLE is true. The default value is D3DBLEND_ZERO.

D3DRS_BLENDOPALPHA

Value used to select the arithmetic operation applied to separate alpha blending when the render state, D3DRS_SEPARATEALPHABLENDENABLE, is set to TRUE.

Valid values are defined by the D3DBLENDOP enumerated type. The default value is D3DBLENDOP_ADD. If the D3DPMISCCAPS_BLENDOP device capability is not supported, then D3DBLENDOP_ADD is performed. See D3DPMISCCAPS.

关于c++ - 'D3DRS_SEPARATEDESTALPHAENABLE' : undeclared identifier - even though it's mentioned in the DirectX comments?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1192032/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com