Page 1 of 1

Font loading error only in release ( VS 2005 )

Posted: Tue Feb 07, 2006 00:01
by FluXy
Heya CEGUI guys,

I have an error loading a font in Secret Maryo Chronicles which only happens in release mode. I tried compiling without STLPort and with and messed with the initialization but no luck :roll:

Debug works and if i start the game from VS with debugging i also have no errors ...
same error on Linux in release.

cegui error log :
07/02/2006 00:53:23 (InfL2)Started creation of Font 'bluebold_medium' via XML file.
07/02/2006 00:53:23 (InfL1)Attempting to create Imageset 'bluebold_medium_auto_glyph_images' with texture only.
07/02/2006 00:53:23 (Error)Exception: Font::defineFontGlyphs_impl - operation requires a texture larger than the supported maximum.
07/02/2006 00:53:23 (InfL2)Imageset 'bluebold_medium_auto_glyph_images' has been destroyed.
07/02/2006 00:53:23 (Error)XercesParser::parseXMLFile - An unexpected error occurred while parsing XML file 'data/gui/font/bluebold1024_medium.font'.
07/02/2006 00:53:23 (Error)Font::load - loading of Font from file 'data/gui/font/bluebold1024_medium.font' failed.

complete cegui log :
http://www.secretmaryo.org/CEGUI.log

SMC SVN repository :
http://opensvn.csie.org/SMC/SMC/src/

we also read :
http://www.cegui.org.uk/modules/newbb/v ... umpost3939

hope you guys can help us :D

Re: Font loading error only in release ( VS 2005 )

Posted: Tue Feb 07, 2006 00:17
by lindquist
The error you're getting indicates that your graphics hardware does'nt support a texture big enough to hold the glyphs you want to use.

There's not really much you can do except make the font size smaller. or upgrade your hardware.

You would probably want to check the size returned by CEGUI::OpenGLRenderer::getMaxTextureSize and make sure it fits your hardware (256 would indicate a bug somewhere if you have geforce/radeon), you could try a different driver in cases like that.

HTH

Re: Font loading error only in release ( VS 2005 )

Posted: Tue Feb 07, 2006 00:22
by FluXy
I think my hardware should be ok :

AMD Athlon XP 3.0 GHz
1 GB Ram
Radeon 9000 Pro DDR ( 128 MB )

The Linux Hardware was a newer Geforce ...

[EDIT]
Will try the getMaxTextureSize now

Re: Font loading error only in release ( VS 2005 )

Posted: Tue Feb 07, 2006 01:31
by FluXy
It now works if the Renderer and System gets initialized after SDL_SetVideoMode but it's only needed in release. :hammer:

My MAX_TEXTURE_SIZE is 2048.

How can i create a Xerces XML parser in my application and pass it over the System initialization ?

Re: Font loading error only in release ( VS 2005 )

Posted: Tue Feb 07, 2006 01:48
by lindquist
Cool :)

You will always want to create the renderer and system after calling SDL_SetVideoMode. The OpenGLRenderer needs a working OpenGL window at creation, and obviously getMaxTextureSize does not work if there is no GL context.

To use Xerces win32 you must edit include/CEGUIConfig.h.
There's a define to use xerces. Uncomment it.

On Linux it will be used by default if you have xerces-c installed.

HTH

Re: Font loading error only in release ( VS 2005 )

Posted: Wed Feb 08, 2006 16:09
by FluXy
Thanks for your help :!:

everything works now :D