本文整理汇总了C++中GFXStateBlockDesc::setFillModeSolid方法的典型用法代码示例。如果您正苦于以下问题:C++ GFXStateBlockDesc::setFillModeSolid方法的具体用法?C++ GFXStateBlockDesc::setFillModeSolid怎么用?C++ GFXStateBlockDesc::setFillModeSolid使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GFXStateBlockDesc
的用法示例。
在下文中一共展示了GFXStateBlockDesc::setFillModeSolid方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: renderSimple
void NavPath::renderSimple(ObjectRenderInst *ri, SceneRenderState *state, BaseMatInstance *overrideMat)
{
if(overrideMat)
return;
if(state->isReflectPass() || !(isSelected() || mAlwaysRender))
return;
GFXDrawUtil *drawer = GFX->getDrawUtil();
GFXStateBlockDesc desc;
desc.setZReadWrite(true, false);
desc.setBlend(true);
desc.setCullMode(GFXCullNone);
if(isSelected())
{
drawer->drawCube(desc, getWorldBox(), ColorI(136, 255, 228, 5));
desc.setFillModeWireframe();
drawer->drawCube(desc, getWorldBox(), ColorI::BLACK);
}
desc.setZReadWrite(!mXray, false);
ColorI pathColour(255, 0, 255);
if(!mIsLooping)
{
desc.setFillModeSolid();
if(mFromSet) drawer->drawCube(desc, Point3F(0.2f, 0.2f, 0.2f), mFrom, pathColour);
if(mToSet) drawer->drawCube(desc, Point3F(0.2f, 0.2f, 0.2f), mTo, pathColour);
}
GFXStateBlockRef sb = GFX->createStateBlock(desc);
GFX->setStateBlock(sb);
PrimBuild::color3i(pathColour.red, pathColour.green, pathColour.blue);
PrimBuild::begin(GFXLineStrip, mPoints.size());
for (U32 i = 0; i < mPoints.size(); i++)
PrimBuild::vertex3fv(mPoints[i]);
PrimBuild::end();
if(mRenderSearch && getServerObject())
{
NavPath *np = static_cast<NavPath*>(getServerObject());
if(np->mQuery && !dtStatusSucceed(np->mStatus))
{
duDebugDrawTorque dd;
dd.overrideColor(duRGBA(250, 20, 20, 255));
duDebugDrawNavMeshNodes(&dd, *np->mQuery);
dd.render();
}
}
}
示例2: renderMissionArea
void EditTSCtrl::renderMissionArea()
{
MissionArea* obj = MissionArea::getServerObject();
if ( !obj )
return;
if ( !mRenderMissionArea && !obj->isSelected() )
return;
GFXDEBUGEVENT_SCOPE( Editor_renderMissionArea, ColorI::WHITE );
F32 minHeight = 0.0f;
F32 maxHeight = 0.0f;
TerrainBlock* terrain = getActiveTerrain();
if ( terrain )
{
terrain->getMinMaxHeight( &minHeight, &maxHeight );
Point3F pos = terrain->getPosition();
maxHeight += pos.z + mMissionAreaHeightAdjust;
minHeight += pos.z - mMissionAreaHeightAdjust;
}
const RectI& area = obj->getArea();
Box3F areaBox( area.point.x,
area.point.y,
minHeight,
area.point.x + area.extent.x,
area.point.y + area.extent.y,
maxHeight );
GFXDrawUtil* drawer = GFX->getDrawUtil();
GFXStateBlockDesc desc;
desc.setCullMode( GFXCullNone );
desc.setBlend( true );
desc.setZReadWrite( false, false );
desc.setFillModeSolid();
drawer->drawCube( desc, areaBox, mMissionAreaFillColor );
desc.setFillModeWireframe();
drawer->drawCube( desc, areaBox, mMissionAreaFrameColor );
}