
盛崇山
http://antsam.blogone.net
AntsamCGD@hotmail.com
这篇文章我们主要分析 Ogre Material System 的设计方法,同时也分析脚本同
Material System 的结合方式。在分析 Material System 之前我想,我们先分析 Ogre 的脚
本系统的实现。下面看一下 Material System 相关类的 UML 图:
Resource
(f rom File Sy stem)
Texture
TextureLayer
MaterialSys tem
Material
Material 是通过脚本读取的,现在我们看一个实例:
PlayPen/EnvmapPlanar
{
ambient 1.0 1.0 1.0
diffuse 1.0 1.0 1.0
// Texture layer 0
{
texture RustySteel.jpg
}
// Texture layer 1
{
texture spheremap.png
colour_op add
env_map planar
}
}