本文整理汇总了C++中Viewport::getConfigElement方法的典型用法代码示例。如果您正苦于以下问题:C++ Viewport::getConfigElement方法的具体用法?C++ Viewport::getConfigElement怎么用?C++ Viewport::getConfigElement使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Viewport
的用法示例。
在下文中一共展示了Viewport::getConfigElement方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: sim_vp
/**
* Callback when display is added to display manager.
* @pre Must be in kernel controlling thread.
* @note This function can only be called by the display manager
* functioning on behalf of a thread the holds the kernel
* reconfiguration lock.
* This guarantees that we are not rendering currently.
* We will most likely be waiting for a render trigger.
*/
void D3dDrawManager::addDisplay(DisplayPtr disp)
{
vprASSERT(disp != NULL); // Can't add a null display
vprDEBUG(vrjDBG_DRAW_MGR, 0)
<< "========= vrj::D3dDrawManager::addDisplay: " << disp
<< std::endl << vprDEBUG_FLUSH;
// -- Finish Simulator setup
std::vector<vrj::Viewport*>::size_type num_vp(disp->getNumViewports());
std::vector<vrj::Viewport*>::size_type i;
for ( i = 0 ; i < num_vp ; ++i )
{
Viewport* vp = disp->getViewport(i);
if (vp->isSimulator())
{
jccl::ConfigElementPtr vp_element = vp->getConfigElement();
SimViewport* sim_vp(NULL);
sim_vp = dynamic_cast<SimViewport*>(vp);
vprASSERT(NULL != sim_vp);
sim_vp->setDrawSimInterface(DrawSimInterfacePtr());
// Create the simulator stuff
vprASSERT(1 == vp_element->getNum("simulator_plugin") && "You must supply a simulator plugin.");
// Create the simulator stuff
jccl::ConfigElementPtr sim_element =
vp_element->getProperty<jccl::ConfigElementPtr>("simulator_plugin");
vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_CONFIG_LVL)
<< "D3dDrawManager::addDisplay() creating simulator of type '"
<< sim_element->getID() << "'\n" << vprDEBUG_FLUSH;
DrawSimInterfacePtr new_sim_i(
D3dSimInterfaceFactory::instance()->createObject(sim_element->getID())
);
// XXX: Change this to an error once the new simulator loading code is
// more robust. -PH (4/13/2003)
vprASSERT(NULL != new_sim_i.get() &&
"Failed to create draw simulator");
sim_vp->setDrawSimInterface(new_sim_i);
new_sim_i->initialize(sim_vp);
new_sim_i->config(sim_element);
}
}
// -- Create a window for new display
// -- Store the window in the wins vector
// Create the gl window object. NOTE: The glPipe actually "creates" the opengl window and context later
D3dWindow* new_win = new D3dWindow();
new_win->configWindow(disp); // Configure it
mNewWins.push_back(new_win); // Add to our local window list
//vprASSERT(isValidWindow(new_win)); // Make sure it was added to draw manager
}