myRenderWindow->Delete();
myRenderWindow->DoubleBufferOn();
+
+#ifndef WNT
+ myRenderWindow->SetDisplayId((void*)x11Display());
+#endif
+ myRenderWindow->SetWindowId((void*)winId());
}
{
// Final initialization just before the widget is displayed
GetDevice()->SetSize(width(),height());
-#ifndef WNT
- getRenderWindow()->SetDisplayId((void*)x11Display());
-#endif
- getRenderWindow()->SetWindowId((void*)winId());
- GetDevice()->Enable();
+ if(!GetDevice()->GetInitialized()){
+ GetDevice()->Initialize();
+ GetDevice()->ConfigureEvent();
+ }
}
//----------------------------------------------------------------------------
QVTK_RenderWindowInteractor
::paintEvent( QPaintEvent* theEvent )
{
- if(GetDevice()->GetEnabled()){
- if(!GetDevice()->GetInitialized()){
- GetDevice()->Initialize();
- GetDevice()->ConfigureEvent();
- }
- GetDevice()->Render();
- }
+ GetDevice()->Render();
}