本文整理汇总了C++中StateSet::setTextureMode方法的典型用法代码示例。如果您正苦于以下问题:C++ StateSet::setTextureMode方法的具体用法?C++ StateSet::setTextureMode怎么用?C++ StateSet::setTextureMode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StateSet
的用法示例。
在下文中一共展示了StateSet::setTextureMode方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: initOQState
// Create and return a StateSet appropriate for performing an occlusion
// query test (disable lighting, texture mapping, etc). Probably some
// room for improvement here. Could disable shaders, for example.
StateSet* initOQState()
{
StateSet* state = new StateSet;
// TBD Possible bug, need to allow user to set render bin number.
state->setRenderBinDetails( 9, "RenderBin" );
state->setMode( GL_LIGHTING, StateAttribute::OFF | StateAttribute::PROTECTED);
state->setTextureMode( 0, GL_TEXTURE_2D, StateAttribute::OFF | StateAttribute::PROTECTED);
state->setMode( GL_CULL_FACE, StateAttribute::ON | StateAttribute::PROTECTED);
ColorMask* cm = new ColorMask( false, false, false, false );
state->setAttributeAndModes( cm, StateAttribute::ON | StateAttribute::PROTECTED);
Depth* d = new Depth( Depth::LEQUAL, 0.f, 1.f, false );
state->setAttributeAndModes( d, StateAttribute::ON | StateAttribute::PROTECTED);
PolygonMode* pm = new PolygonMode( PolygonMode::FRONT_AND_BACK, PolygonMode::FILL );
state->setAttributeAndModes( pm, StateAttribute::ON | StateAttribute::PROTECTED);
PolygonOffset* po = new PolygonOffset( -1., -1. );
state->setAttributeAndModes( po, StateAttribute::ON | StateAttribute::PROTECTED);
return state;
}