|
|
我创建了一个D3D纹理混合操作去执行一个特定的操作,但是它并没有成功!为什么?"caps_设备功能参数"告诉我最多可以使用8个纹理混合器,我只使用了4个。
虽然"caps_设备功能参数"表示最多支持8组纹理混合器,但那并不代表所有的混合操作都被支持。D3D8 添加了一个"ValidateDevice_有效设备"来帮助检查所支持的功能。所以在开始你的游戏以前,你应该使用这个设备来检查你要用到的所有功能。为了支持旧的显卡,像GeForce4 MX 和 GeForce2 ,你应该允许回退到只支持两个纹理混合器的状态;如果你使用OpenGL,你可以使用寄存器混合扩展来达到更强大的功能。
/***************************/
I've set up my Direct3D texture stage states to perform an operation, but it's not working! What's wrong? The caps report 8 stages are supported and I'm only using 4.
Although 8 stages may be reported by the caps, that doesn't mean that all combinations of operations are supported. D3D8 added the ValidateDevice function to help with this. So before you start your game, you should run through the techniques you would like to use, and test them with ValidateDevice. To support older cards like GeForce4 MX and GeForce2 you should provide a final fallback that supports only two texture stages. If you use OpenGL, you may be able to access greater functionality through the register combiners extension.
|
|