From Eduardo Poyart, "The attached patch fixes a race condition that caused OSG to try to render the scene before the window is realized. It works ok in my osgviewerWX-derived application under Linux."
This commit is contained in:
parent
ea5d88e54f
commit
14a12afb6c
@ -106,6 +106,9 @@ void MainFrame::SetViewer(osgViewer::Viewer *viewer)
|
|||||||
|
|
||||||
void MainFrame::OnIdle(wxIdleEvent &event)
|
void MainFrame::OnIdle(wxIdleEvent &event)
|
||||||
{
|
{
|
||||||
|
if (!_viewer->isRealized())
|
||||||
|
return;
|
||||||
|
|
||||||
_viewer->frame();
|
_viewer->frame();
|
||||||
|
|
||||||
event.RequestMore();
|
event.RequestMore();
|
||||||
|
@ -67,7 +67,7 @@ public:
|
|||||||
// not implemented yet...just use dummy implementation to get working.
|
// not implemented yet...just use dummy implementation to get working.
|
||||||
virtual bool valid() const { return true; }
|
virtual bool valid() const { return true; }
|
||||||
virtual bool realizeImplementation() { return true; }
|
virtual bool realizeImplementation() { return true; }
|
||||||
virtual bool isRealizedImplementation() const { return true; }
|
virtual bool isRealizedImplementation() const { return _canvas->IsShownOnScreen(); }
|
||||||
virtual void closeImplementation() {}
|
virtual void closeImplementation() {}
|
||||||
virtual bool releaseContextImplementation() { return true; }
|
virtual bool releaseContextImplementation() { return true; }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user