//------------------------------------------------------------------------------
void QtOgreRenderWindow::paintEvent( QPaintEvent* e )
{
  if( auto_render_ && render_window_ )
  {
    if( pre_render_callback_ )
    {
      pre_render_callback_();
    }

    if( ogre_root_->_fireFrameStarted() )
    {
#if (OGRE_VERSION_MAJOR >= 1 && OGRE_VERSION_MINOR >= 6)
      ogre_root_->_fireFrameRenderingQueued();
#endif

      render_window_->update();

      ogre_root_->_fireFrameEnded();
    }

    if ( post_render_callback_ )
    {
      post_render_callback_();
    }
  }
}
//------------------------------------------------------------------------------
void wxOgreRenderWindow::onPaint (wxPaintEvent &evt)
{
  evt.Skip();

  if ( pre_render_callback_ )
  {
    pre_render_callback_();
  }

  if( !ogre_root_->_fireFrameStarted() )
  {
    return;
  }

  render_window_->update();

  ogre_root_->_fireFrameEnded();

  if ( post_render_callback_ )
  {
    post_render_callback_();
  }
}