好了,还是从第五章的程序开始。代码将会用到SDK中的两个模型(tiger.x 和cube.x),除此之外,还有个一小球体的模型。确保你把老虎模型的纹理一起拷贝到了当前目录下。添加如下变量:
private float tessLevel = 1.0f; private const float tessIncrement = 1.0f; private string filename = @"..\..\sphere.x"; private Microsoft.DirectX.Direct3D.Font font = null; 先保存了当前的细分级别(tessellation level)(初始化为