本文整理汇总了C++中Display::close方法的典型用法代码示例。如果您正苦于以下问题:C++ Display::close方法的具体用法?C++ Display::close怎么用?C++ Display::close使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Display
的用法示例。
在下文中一共展示了Display::close方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char *argv[]){
Display *x;
void *instance = 0x0;
int retcode = 0;
try{
cout << "Opening an 800x600 @ 24 bits display for 5 seconds...";
cout.flush();
x = new Display(driver_path, 800, 600, 24);
x->open(true);
sleep(5);
x->close();
cout << "Deallocating... ";
cout.flush();
xvr2_delete(x);
cout << "done" << endl;
}
catch(Exception::Exception e){
cerr << "Operation failed: " << e.toString() << endl;
}
return retcode;
}
示例2:
~Impl()
{
if (m_display)
m_display->close();
delete m_serial_tile_callback_factory;
delete m_serial_renderer_controller;
RENDERER_LOG_DEBUG("destroying osl shading system...");
m_project.get_scene()->release_optimized_osl_shader_groups();
m_shading_system->release();
delete m_renderer_services;
const string stats = m_texture_system->getstats();
const string modified_stats = prefix_all_lines(trim_both(stats), "oiio: ");
RENDERER_LOG_DEBUG("%s", modified_stats.c_str());
RENDERER_LOG_DEBUG("destroying oiio texture system...");
m_texture_system->release();
delete m_error_handler;
}