本文整理汇总了C++中CBaseGroundDrawer::DrawTrees方法的典型用法代码示例。如果您正苦于以下问题:C++ CBaseGroundDrawer::DrawTrees方法的具体用法?C++ CBaseGroundDrawer::DrawTrees怎么用?C++ CBaseGroundDrawer::DrawTrees使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBaseGroundDrawer
的用法示例。
在下文中一共展示了CBaseGroundDrawer::DrawTrees方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Draw
void CWorldDrawer::Draw()
{
SCOPED_TIMER("WorldDrawer::Total");
CBaseGroundDrawer* gd = readmap->GetGroundDrawer();
if (globalRendering->drawSky) {
sky->Draw();
}
if (globalRendering->drawGround) {
SCOPED_TIMER("WorldDrawer::Terrain");
gd->Draw(DrawPass::Normal);
smoothHeightMeshDrawer->Draw(1.0f);
treeDrawer->DrawGrass();
gd->DrawTrees();
}
if (globalRendering->drawWater && !mapInfo->map.voidWater) {
SCOPED_TIMER("WorldDrawer::Water");
water->OcclusionQuery();
if (water->IsDrawSolid()) {
water->UpdateWater(game);
water->Draw();
}
}
selectedUnits.Draw();
eventHandler.DrawWorldPreUnit();
{
SCOPED_TIMER("WorldDrawer::Models");
DebugColVolDrawer::Draw();
unitDrawer->Draw(false);
modelDrawer->Draw();
featureDrawer->Draw();
pathDrawer->DrawAll();
}
//! transparent stuff
glEnable(GL_BLEND);
glDepthFunc(GL_LEQUAL);
const bool noAdvShading = shadowHandler->shadowsLoaded;
static const double plane_below[4] = {0.0f, -1.0f, 0.0f, 0.0f};
static const double plane_above[4] = {0.0f, 1.0f, 0.0f, 0.0f};
{
glClipPlane(GL_CLIP_PLANE3, plane_below);
glEnable(GL_CLIP_PLANE3);
//! draw cloaked objects below water surface
unitDrawer->DrawCloakedUnits(noAdvShading);
featureDrawer->DrawFadeFeatures(noAdvShading);
glDisable(GL_CLIP_PLANE3);
}
//! draw water
if (globalRendering->drawWater && !mapInfo->map.voidWater) {
SCOPED_TIMER("WorldDrawer::Water");
if (!water->IsDrawSolid()) {
//! Water rendering will overwrite features, so save them
featureDrawer->SwapFeatures();
water->UpdateWater(game);
water->Draw();
featureDrawer->SwapFeatures();
}
}
{
glClipPlane(GL_CLIP_PLANE3, plane_above);
glEnable(GL_CLIP_PLANE3);
//! draw cloaked objects above water surface
unitDrawer->DrawCloakedUnits(noAdvShading);
featureDrawer->DrawFadeFeatures(noAdvShading);
glDisable(GL_CLIP_PLANE3);
}
{
SCOPED_TIMER("WorldDrawer::Projectiles");
projectileDrawer->Draw(false);
}
if (globalRendering->drawSky) {
sky->DrawSun();
}
eventHandler.DrawWorld();
LuaUnsyncedCtrl::DrawUnitCommandQueues();
if (cmdColors.AlwaysDrawQueue() || guihandler->GetQueueKeystate()) {
selectedUnits.DrawCommands();
}
//.........这里部分代码省略.........