Ogre<->CEGUI texture

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

blablub
Not too shy to talk
Not too shy to talk
Posts: 28
Joined: Tue Mar 01, 2011 11:56

Ogre<->CEGUI texture

Postby blablub » Tue Apr 12, 2011 16:34

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.

blablub
Not too shy to talk
Not too shy to talk
Posts: 28
Joined: Tue Mar 01, 2011 11:56

Re: Ogre<->CEGUI texture

Postby blablub » Wed Apr 13, 2011 08:53

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.
Last edited by blablub on Wed Apr 13, 2011 09:03, edited 1 time in total.

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: Ogre<->CEGUI texture

Postby Kulik » Wed Apr 13, 2011 08:59

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.

blablub
Not too shy to talk
Not too shy to talk
Posts: 28
Joined: Tue Mar 01, 2011 11:56

Re: Ogre<->CEGUI texture

Postby blablub » Wed Apr 13, 2011 09:04

yeah, thanks, I tried including it without the sub paths...


Return to “Help”

Who is online

Users browsing this forum: Google [Bot] and 31 guests