'D3DRS_SEPARATEDESTALPHAENABLE' :未声明的标识符 - 即使 DirectX 注释中提到了它?
在 d3d9types.h 的 _D3DRENDERSTATETYPE 结构中,最后 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 但希望有人确认?
In d3d9types.h in the _D3DRENDERSTATETYPE struct the last 3 types are:
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 */
Notice it mentions that these will be used if 'D3DRS_SEPARATEDESTALPHAENABLE is TRUE', however there is no D3DRS_SEPARATEDESTALPHAENABLE in the struct whatsoever. The closest thing seems to be: "D3DRS_SEPARATEALPHABLENDENABLE" but I'm not at all sure if this is the same thing.
So i was just wondering what should be set to true for those last three renderstates to actually work (if anything?), I strongly think it's D3DRS_SEPARATEALPHABLENDENABLE but would like someone to please confirm?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,D3DRS_SEPARATEALPHABLENDENABLE。 评论里好像有错别字。
来自 DXSDK:
Yep, D3DRS_SEPARATEALPHABLENDENABLE. Looks like a typo in the comments.
From the DXSDK: