Page 1 of 1

Ogre<->CEGUI texture

Posted: Tue Apr 12, 2011 16:34
by blablub
This tutorial:
http://www.ogre3d.org/tikiwiki/Basic+Tu ... to_Texture
tells me it is for Ogre >= 1.7 and CEGUI >= 0.7 and it tells me:

Code: Select all

CEGUI::Texture &guiTex = mRenderer->createTexture(tex);

where "tex" is of type "Ogre::TexturePtr".

When doing this, I get the error:
no matching function for call to 'CEGUI::Renderer::createTexture(Ogre::TexturePtr&)'


How do I get Ogre textures to work in CEGUI? I found several old posts over the net, but they are only covering stone-age versions of Ogre and CEGUI that don't even have some of the needed functions for doing this.

Im using CEGUI 0.7.5, Ogre 1.7.2.

Re: Ogre<->CEGUI texture

Posted: Wed Apr 13, 2011 08:53
by blablub
One problem solved, but one more came up:

I found out that I have to cast the renderer to CEGUI::OgreRenderer (I use bootstrap initialisation, maybe that's why it isn't it autoamtically), which provides the needed createTexture(). But now I get the error:

"OgreRenderer is not part of CEGUI"

I tried several includes (CEGUI.h, CEGUIRenderer.h, ...), because CEGUIOgreRenderer.h doesn't exist in 0.7.5.

How can I solve this?

edit: ah, found it out... The include file is in another folder "RendererModules/Ogre/CEGUIOgreRenderer.h>". Now it compiles.

Re: Ogre<->CEGUI texture

Posted: Wed Apr 13, 2011 08:59
by Kulik
never seen that error message, what kind of compiler are you using?

Code: Select all

#include "RendererModules/Ogre/CEGUIOgreRenderer.h"


Don't be afraid to see the list of header files yourself next time. Browsing source is a legit source of information.

Re: Ogre<->CEGUI texture

Posted: Wed Apr 13, 2011 09:04
by blablub
yeah, thanks, I tried including it without the sub paths...