Hi, I am trying to setup an application using Qt in QtCreator, using qmake that uses Qt as the windowing engine, but has some widget(s) with an Ogre3D instance in them.

I am following the guide on how to integrate Ogre3D into Qt here: http://www.ogre3d.org/tikiwiki/QtOgre

The example code on the wiki uses the Qt functions initializeGL, paintGL, and resizeGL to draw the Ogre instance into the Qt widget. As part of this process it uses the following in the initialization:

Qt Code:
  1. QX11Info info = x11Info();
  2. Ogre::String winHandle;
  3. winHandle = Ogre::StringConverter::toString((unsigned long)(info.display()));
  4. winHandle += ":";
  5. winHandle += Ogre::StringConverter::toString((unsigned int)(info.screen()));
  6. winHandle += ":";
  7. winHandle += Ogre::StringConverter::toString((unsigned long)(this->parentWidget()->winId()));
  9. Ogre::NameValuePairList params;
  10. params["parentWindowHandle"] = winHandle;
  12. mOgreWindow = mOgreRoot->createRenderWindow( "QOgreWidget_RenderWindow",
  13. this->width(),
  14. this->height(),
  15. false,
  16. &params );
  18. mOgreWindow->setActive(true);
  19. WId ogreWinId = 0x0;
  20. mOgreWindow->getCustomAttribute( "WINDOW", &ogreWinId );
  22. assert( ogreWinId );
  24. this->create( ogreWinId );
  25. setAttribute( Qt::WA_PaintOnScreen, true );
  26. setAttribute( Qt::WA_NoBackground );
To copy to clipboard, switch view to plain text mode 

The line I am interested in is the first line. The x11info() function is not available on Mac (and presumably not on Windows) so what equivalent functions could I use to gain the same effect cross platform?

I would appreciate any help anyone could give on this topic.