i am desperately trying to implement a real-time minimap using Ogre and CEGUI.
There a i fact quite a few tutorials about this on the net, but they are all related to outdated versions of CEGUI.
What I´m doing is the following:
Code: Select all
//Create Ogre Texture
texturePtr = GraphicsController::GetSingleton().GetRoot()->getTextureManager()->createManual(
"minimap_rtt",
Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME,
Ogre::TEX_TYPE_2D,
width,
height,
0,
Ogre::PF_R8G8B8,
Ogre::TU_RENDERTARGET);
renderTexture = texturePtr->getBuffer()->getRenderTarget();
//Create a camera
minimapCam = SceneMgr->createCamera(name);
minimapCam->setPosition(100,-100,-400);
minimapCam->lookAt(0,0,-300);
/Create a viewport
minimapView = renderTexture->addViewport(minimapCam);
minimapView->setOverlaysEnabled(false);
minimapView->setClearEveryFrame(true);
minimapView->setBackgroundColour(Ogre::ColourValue::Black);
Up to that point everythin works fine, but its getting tricky when i want to pass my texture to CEGUI.
All tutorials state something like this:
Code: Select all
CEGUI::Texture &guiTex = mRenderer->createTexture(texturePtr);
But a method with a corresponding signature is not available in newer CEGUI Versions (I`m using the latest one)
So here`s my question:
How do i create a CEGUI texture from my Ogre texture?
Reading the API i found no method i can pass my ogre texture to? How can i do that?