|
大家好!请问一下,我现在有个矩形需要铁纹理,矩形已经给出来了,贴图片有时候会是倒的,我想用纹理把他翻转过来应该怎么办!我用纹理矩阵旋转怎么就不显示了纹理了啊(代码如下)。纹理矩阵里面的旋转怎么用阿()
osg::Matrix mat2;
// mat2.makeTranslate(0.0f,0.0f,0.0f);
mat2.makeRotate(-90,1.0,0.0,0.0);
osg::ref_ptr<osg::TexMat> texmat2 = new osg::TexMat;
texmat2->setMatrix(mat2);
stateset->setTextureAttribute(0,texmat2);
|
|