Can't create MovableText object from subscriber/service callback in system plugin
Hy guys, here is the situation:
I want to place some visual objects in my world using a gui system plugin. The parameters of the object to be created are sent through messages. When I call the
Load method from
rendering::MovableText *obj inside the service/publisher callback method, it crashes, giving the following error:
terminate called after throwing an instance of 'Ogre::RenderingAPIException' what(): OGRE EXCEPTION(3:RenderingAPIException): Zero sized texture surface on texture ArialTexture face 0 mipmap 0. Probably, the GL driver refused to create the texture. in GLTexture::_createSurfaceList at /build/buildd/ogre-1.7.4+dfsg1/RenderSystems/GL/src/OgreGLTexture.cpp (line 406) Aborted (core dumped)
If I try to create the object in the plugin's OnUpdate method, it succeeds without errors. So this thing doesn't seem to be functional only in the publisher/service callback method, as I've mentioned in the beginning.
Any ideas? Thanks.