本文整理汇总了C++中CDirtyRegionList::begin方法的典型用法代码示例。如果您正苦于以下问题:C++ CDirtyRegionList::begin方法的具体用法?C++ CDirtyRegionList::begin怎么用?C++ CDirtyRegionList::begin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CDirtyRegionList
的用法示例。
在下文中一共展示了CDirtyRegionList::begin方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Render
bool CGUIWindowManager::Render()
{
/*
参数:
1、
返回:
1、
说明:
1、
*/
assert(g_application.IsCurrentThread());
CSingleLock 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.size() > 0)
{
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);
}
m_tracker.CleanMarkedRegions();
return hasRendered;
}
示例2: Process
void CGUIWindowManager::Process(unsigned int currentTime)
{
assert(g_application.IsCurrentThread());
CSingleLock lock(g_graphicsContext);
CDirtyRegionList dirtyregions;
CGUIWindow* pWindow = GetWindow(GetActiveWindow());
if (pWindow)
pWindow->DoProcess(currentTime, dirtyregions);
// process all dialogs - visibility may change etc.
for (WindowMap::iterator it = m_mapWindows.begin(); it != m_mapWindows.end(); it++)
{
CGUIWindow *pWindow = (*it).second;
if (pWindow && pWindow->IsDialog())
pWindow->DoProcess(currentTime, dirtyregions);
}
if (g_application.m_AppActive)
{
for (CDirtyRegionList::iterator itr = dirtyregions.begin(); itr != dirtyregions.end(); itr++)
m_tracker.MarkDirtyRegion(*itr);
}
}