テクスチャの追加 (Direct3D 9)
テクスチャを追加するには、ファイル形式の階層的性質を使用し、オプションの TextureFilename データ オブジェクトを Material データ オブジェクトに追加します。 Material オブジェクトは、次のように読み取られます。
Material RedMaterial {
1.000000;0.000000;0.000000;1.000000;; // R = 1.0, G = 0.0, B = 0.0
0.000000;
0.000000;0.000000;0.000000;;
0.000000;0.000000;0.000000;;
TextureFilename { "tex1.ppm"; }
}
Material GreenMaterial {
0.000000;1.000000;0.000000;1.000000;; // R = 0.0, G = 1.0, B = 0.0
0.000000;
0.000000;0.000000;0.000000;;
0.000000;0.000000;0.000000;;
TextureFilename { "win95.ppm"; }
}
関連トピック