There are several Code examples around, but I get an error for each one ^^
This is how I create the Ogre Texture:
Code: Select all
Ogre::TexturePtr texture = Ogre::TextureManager::getSingleton().createManual( "minimap_tex",
Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, Ogre::TEX_TYPE_2D,
512, 512, 0, Ogre::PF_R8G8B8, Ogre::TU_RENDERTARGET );
Now three attempts for the CEGUI Texture:
1. based on Ogre wiki
http://www.ogre3d.org/wiki/index.php/File_DialogBuild.cpp
Code: Select all
CEGUI::OgreCEGUITexture* ceguiTex = (CEGUI::OgreCEGUITexture*) CEGUI::System::getSingleton().getRenderer()->createTexture();
ceguiTex->setOgreTexture(texture);
2. Based on Ogre tutorial
http://www.ogre3d.org/wiki/index.php/Basic_Tutorial_7
Code: Select all
CEGUI::OgreCEGUITexture* ceguiTex = (CEGUI::OgreCEGUITexture*) CEGUI::System::getSingleton().getRenderer()->createTexture((CEGUI::utf8*)"minimap_tex");
3. Based on some forum thread here
Code: Select all
CEGUI::OgreCEGUITexture* ceguiTex = (CEGUI::OgreCEGUITexture*) CEGUI::System::getSingleton().getRenderer()->createTexture(texture);
The first one gives a linking error
undefined reference to `CEGUI::OgreCEGUITexture::setOgreTexture(Ogre::TexturePtr&)'
while the latter two give the compile time error that I am calling createTexture with wrong arguments. I guess the first attempt is closest to the solution.
Concerning the linker error: I am already using these libs:
pkg-config --libs CEGUI-OGRE
-lCEGUIOgreRenderer -lOgreMain -lCEGUIBase
whats missing ?
Thank you very much