First off, please forgive me if my question sounds primitive and stupid. I am mostly a C# .NET and database developer, but I am a newbie to Ogre3D, and my Qt4/C++ dev experience is also rather limited...
I have code which renders a custom Qt4 widget (a subclass of QWidget) onto a QPixmap, and I have to display it on an Ogre3D surface.
I've been reading the latest Ogre3D book and searching for a QWidget-to-Ogre3D code sample for several days now, but couldn't find how to do that.
I assume that I need to somehow create a Texture (or maybe, a Mesh) manually from the QPixmap (probably, saved as a byte array with a "PNG" or "BMP" option), but I'm having trouble trying to figure out how to do that.
Could someone point me in the right direction, please?
Thank you very much in advance.
Here's what I currently have:
m_currentGraph->setFixedSize(QSize(WIDTH, HEIGHT));
QPainter painter(this);
painter.end();
QPixmap pixmap(WIDTH, HEIGHT);
m_currentGraph->render(&pixmap);
QByteArray bytes;
QBuffer buffer(&bytes);
buffer.open(QIODevice::WriteOnly);
pixmap.save(&buffer, "PNG"); // writes pixmap into bytes in PNG format
// How to render it onto Ogre3D ???