2010年3月21日 星期日

材質讀入

1. 先確定上次的ResourceManager有成功

2. 把 *.material 和 裡頭的圖檔丟到指定的Resource資料夾( 就是你設定的 )

3. 寫程式 ^q^

天空盒範例
m_scene_mgr->setSkyBox(true,"Examples/SpaceSkyBox");

true是啟用天空盒
Examples/SpaceSkyBox 是名字


material Examples/SpaceSkyBox
{
technique
{
pass
{
lighting off
depth_write off

texture_unit
{
cubic_texture stevecube.jpg separateUV
tex_address_mode clamp
}
}
}
}

 separateUV 是指原本指的是圖檔 *.jpg
會用 *_BK.jpg 等六張去讀的樣子( 不太確定- -;  )


分別是 _UP,_DN,_LF,_RT,_FR,_BK = 上下左右前後

tex_address_mode? 施主,這問(ry

*補充 :
這個腳本是名為 " Example.material "的材質檔
你可以在安裝Ogre SDK的 media\materials\scripts 裡找到它

沒有留言:

張貼留言