|

楼主 |
发表于 2013-4-27 09:58:02
|
显示全部楼层
liuzhiyu123 发表于 2013-4-27 08:48 
设置不同的纹理单元的坐标,然后enable就行了吧,应该不是多层叠加的
对 Geometry 进行 setTexCoordIndices( unit, array);
这个参数unit就是对应的 textureUnit的index,
这样设置后,对整个Geometry都有作用。
以下是OSG文件的
textureUnit 0 {.....................}
textureUnit 1 {.....................}
TextCoordArray 0 vec2Array 12
{
1 2
1 2
1 2
1 2
1 2
1 2
0 0
0 0
0 0
0 0
0 0
0 0
}
TextCoordArray 1 vec2Array 12
{
0 0
0 0
0 0
0 0
0 0
0 0
1 2
1 2
1 2
1 2
1 2
1 2
}
上面的纹理坐标中的 0 0表示,我不需要这个,但是如果不吧这个加上,显示效果根本不对了 |
|