当前位置: 首页>>代码示例>>C++>>正文


C++ DisplayPtr::isActive方法代码示例

本文整理汇总了C++中DisplayPtr::isActive方法的典型用法代码示例。如果您正苦于以下问题:C++ DisplayPtr::isActive方法的具体用法?C++ DisplayPtr::isActive怎么用?C++ DisplayPtr::isActive使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DisplayPtr的用法示例。


在下文中一共展示了DisplayPtr::isActive方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: addDisplay

// notifyDrawMgr = 0; Defaults to 0
int DisplayManager::addDisplay(DisplayPtr disp, bool notifyDrawMgr)
{
   vprDEBUG(vrjDBG_DISP_MGR, vprDBG_VERB_LVL)
      << "vrj::DisplayManager::addDisplay()\n" << vprDEBUG_FLUSH;

   // Test if active or not, to determine correct list
   // The place it in the list
   // --- Update Local Display structures
   if (disp->isActive())
   {
      mActiveDisplays.push_back(disp);
   }
   else
   {
      mInactiveDisplays.push_back(disp);
   }

   // If we are supposed to notify about, and valid draw mgr, and disp is active
   if ((notifyDrawMgr) && (mDrawManager != NULL) && (disp->isActive()))
   {
      mDrawManager->addDisplay(disp);;    // Tell Draw Manager to add dislay;
   }

   return 1;
}
开发者ID:Michael-Lfx,项目名称:vrjuggler,代码行数:26,代码来源:DisplayManager.cpp

示例2: closeDisplay

/**
 * Closes the given display.
 *
 * @pre disp is a display we know about.
 * @post disp has been removed from the list of displays
 *    (notifyDrawMgr == true) && (drawMgr != NULL) && (disp is active)
 *    ==> Draw manager has been told to clode the window for the display
 */
int DisplayManager::closeDisplay(DisplayPtr disp, bool notifyDrawMgr)
{
   vprASSERT(isMemberDisplay(disp));       // Make sure that display actually exists

   vprDEBUG(vrjDBG_DISP_MGR, vprDBG_STATE_LVL)
      << "[vrj::DisplayManager::closeDisplay()] Closing display named '"
      << disp->getName() << "'" << std::endl << vprDEBUG_FLUSH;

   // Notify the draw manager to get rid of it
   // Note: if it is not active, then the draw manager doesn't know about it
   if ((notifyDrawMgr) && (mDrawManager != NULL) && (disp->isActive()))
   {
      mDrawManager->removeDisplay(disp);
   }

   // Remove it from local data structures
   size_t num_before_close = mActiveDisplays.size() + mInactiveDisplays.size();
   mActiveDisplays.erase( std::remove(mActiveDisplays.begin(), mActiveDisplays.end(), disp),
                          mActiveDisplays.end());
   mInactiveDisplays.erase( std::remove(mInactiveDisplays.begin(), mInactiveDisplays.end(), disp),
                            mInactiveDisplays.end());
   vprASSERT(num_before_close == (1+mActiveDisplays.size() + mInactiveDisplays.size()));
   boost::ignore_unused_variable_warning(num_before_close);

   return 1;
}
开发者ID:Michael-Lfx,项目名称:vrjuggler,代码行数:34,代码来源:DisplayManager.cpp


注:本文中的DisplayPtr::isActive方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。