/** Handle a paint event (just render again, if needed create render window) @param e The event data */ void QtSpacescapeWidget::paintEvent(QPaintEvent *) { if(!mRenderWindow) { createRenderWindow(); setupResources(); setupScene(); } update(); }
//Application initialisation void Application::initialise() { createRoot(); defineResources(); setupRenderSystem(); createRenderWindow(); initialiseResourceGroups(); setupScene(); setupInputSystem(); }
//------------------------------------------------------------------------------ wxOgreRenderWindow::wxOgreRenderWindow (Ogre::Root* ogre_root, wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, long style, const wxValidator &validator) : wxControl( parent, id, pos, size, style, validator ) , render_window_( 0 ) , ogre_root_( ogre_root ) , ortho_scale_( 1.0f ) { SetBackgroundStyle(wxBG_STYLE_CUSTOM); createRenderWindow(); viewport_ = render_window_->addViewport( NULL ); }