fonts material problems

akem321

21-12-2007 01:27:04

Hey,

Got a little pblm with ttf fonts, when starting the gui system, more precisly when adding a widget, i get this error:

OgreMaterial.cpp:244: Ogre::Technique* Ogre::Material::getTechnique(short unsigned int): Assertion `index < mTechniques.size() && "Index out of bounds."' failed.

means the material has no supported techniques, but the problem is that it throw me the error on material: "Fonts/acmesa.10"

i wonder if the font materials are generated by Ogre or QuickGUI ?
and if anyone has an idea what could be the problem here

here s the end of the log:

02:19:09: Quickgui : Adding qgui.window.border.right.pngto skinqgui
02:19:09: Quickgui : Adding qgui.scrollbar.vertical.up.down.pngto skinqgui
02:19:09: Quickgui : Adding qgui.checkbox.unchecked.pngto skinqgui
02:19:09: Quickgui : Adding qgui.combobox.button.over.pngto skinqgui
02:19:09: QuickGui ConfigScriptSerializer : saving to./data/gui/qgui.skinset
02:19:09: ConfigScriptSerializer : done.
02:19:09: Font acmesa.10using texture size 256x256
02:19:09: Info: Freetype returned null for character 166 in font acmesa.10
02:19:09: Texture: acmesa.10Texture: Loading 1 faces(PF_BYTE_LA,256x256x1) with hardware generated mipmaps from Image. Internal format is PF_BYTE_LA,256x256x1.

kungfoomasta

21-12-2007 05:29:01

Is the font being loaded? Do you have a *.fontdef file with "acmesa.10" defined?

You should see something like

22:38:15: Parsing script Ogre.fontdef

akem321

21-12-2007 06:57:52

yea i do have .fondef files:

02:49:19: Parsing script acmesa.fontdef
02:49:19: Parsing script micross.fontdef

kungfoomasta

21-12-2007 07:24:37

Are you able to run the demo? Do you initialize and use QuickGUI like in the demo? Can you post your relevant QGUI code?

akem321

03-01-2008 21:48:23

hey,

happy new year :P

sorry, yea i can run demos but i ve finnaly found the pblm i was initializing Ogre manually and i was creating the window via the render system instead of root, so some stuff weren t correctly initialized, it s works fine now :)

http://www.ogre3d.org/phpBB2/viewtopic.php?t=36014

just for infos

ty!

kungfoomasta

03-01-2008 21:59:34

I found that out the hard way as well. It really needs to be documented in the API docs, somebody should submit a patch. :wink:

Glad to hear its working.