本文整理汇总了C++中CDirtyRegionList::empty方法的典型用法代码示例。如果您正苦于以下问题:C++ CDirtyRegionList::empty方法的具体用法?C++ CDirtyRegionList::empty怎么用?C++ CDirtyRegionList::empty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CDirtyRegionList
的用法示例。
在下文中一共展示了CDirtyRegionList::empty方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Render
bool CGUIWindowManager::Render()
{
assert(g_application.IsCurrentThread());
CSingleExit lock(g_graphicsContext);
CDirtyRegionList dirtyRegions = m_tracker.GetDirtyRegions();
bool hasRendered = false;
// If we visualize the regions we will always render the entire viewport
if (g_advancedSettings.m_guiVisualizeDirtyRegions || g_advancedSettings.m_guiAlgorithmDirtyRegions == DIRTYREGION_SOLVER_FILL_VIEWPORT_ALWAYS)
{
RenderPass();
hasRendered = true;
}
else if (g_advancedSettings.m_guiAlgorithmDirtyRegions == DIRTYREGION_SOLVER_FILL_VIEWPORT_ON_CHANGE)
{
if (!dirtyRegions.empty())
{
RenderPass();
hasRendered = true;
}
}
else
{
for (CDirtyRegionList::const_iterator i = dirtyRegions.begin(); i != dirtyRegions.end(); ++i)
{
if (i->IsEmpty())
continue;
g_graphicsContext.SetScissors(*i);
RenderPass();
hasRendered = true;
}
g_graphicsContext.ResetScissors();
}
if (g_advancedSettings.m_guiVisualizeDirtyRegions)
{
g_graphicsContext.SetRenderingResolution(g_graphicsContext.GetResInfo(), false);
const CDirtyRegionList &markedRegions = m_tracker.GetMarkedRegions();
for (CDirtyRegionList::const_iterator i = markedRegions.begin(); i != markedRegions.end(); ++i)
CGUITexture::DrawQuad(*i, 0x0fff0000);
for (CDirtyRegionList::const_iterator i = dirtyRegions.begin(); i != dirtyRegions.end(); ++i)
CGUITexture::DrawQuad(*i, 0x4c00ff00);
}
return hasRendered;
}