Polygon font


11-02-2012 22:13:44

Hi people, im looking for a little help.

I'm using MOGRE which I've built from source and I want some dynamicly generated 3d text in the world. I've found a plugin from OGRE here http://www.ogre3d.org/forums/viewtopic.php?f=11&t=27982 This does exactly what I want but obviously it's not a simple task to get into MOGRE.

I'm a Java/VB.NET guy, I've beifely dabbled in C++ but I really don't know where to start to wrap it myself.

Has anyone got any advise? I basically need that plugin in MOGRE, somehow...



12-02-2012 02:07:14

Hey simmy, unfortunately I dont have very much skill with C++ either, so I wont be able to directly help you with this.
However, in a differnt thread where I had a similar problem, user Lumen mentioned SWIG, which seems to be a program that automatically wraps C++ libraries for you into .NET-usable dlls. (http://www.swig.org/)
That looks like it could potentially help you on your mission to port that library.

Good luck! :)


14-02-2012 14:27:59

Thanks Aralox.

I had a look into SWIG but couldn't quite get my head around it. Instead I cheated.

I took the example app that comes with the polygon font and copied the C++ method that actually does the work into a new method of the scene manager. after spending a day working out how to get it compiled and a little tweaking to pass strings correctly through I now have a createTextMesh method on my mogre scene manager. To be honest, I'm not even 100% sure how it works... but it works! :)

Not the 'correct' way of doing it, but I'll pull out the usual programmers excuse of time constraints.



13-03-2012 11:32:06

Good job :) Maybe you can share the code for the next person who wants to do this? It doesn't matter if it has a few bugs because sharing it will allow others to help find bugs and give back to you.


13-03-2012 22:59:27

Haha very nice! I forgot to subscribe to this thread, so sorry about only replying now :P


18-04-2012 10:23:12

Hi Simmy,

nice to see you here :D

I'm using MOGRE which I've built from source
Sounds interesting - especially for a Mogre newcomer.
Did you use the MogreBuilder or did you compile everything manually?

dynamicly generated 3d text [...] plugin from OGRE here http://www.ogre3d.org/forums/viewtopic.php?f=11&t=27982
Thanks for pointing to this interesting code. I didn't know.

SWIG, which seems to be a program that automatically wraps C++ libraries for you into .NET-usable dlls
SWIG is an autowrapper. In the past also Ogre was wrapped by this tool, but as I read the performance was bad. It should be easy to use and nice for wrapping several C++ coded, but for Ogre it was no good choice.
If I remember right, the Mogre autowrapper was created as alternative to to "OgreDotNet" (wrapped by SWIG) had.

I'm not shure, but I suppose that SWIG is only usable with Mogre, when the C++ code has no Mogre (.NET) calls.
Maybe I'm wrong. If somebody knows more, please tell us. It's not important, but interesting.

I took the example app [...] copied the C++ method [...] spending a day working [...] little tweaking [...] it works! :)
Sounds great.
Did you port the code or used C++ code compiled against .NET?
By the way - Maybe it's easy to "port" code to .NET, because the .NET framework can mix several languages.
If I'm right, you just need to create a second project in your solution file (for C++ to create a library) and convert the Ogre calls for usage with the Mogre API.
Oh, I remember - the same way is used for the add-on MogreNewt.

Thanks for putting this way into my mind. It can be useful for "porting" several Ogre additions to Mogre. 8)

Maybe you can share the code
Yes, we would be happy if you publish your code. If you don't have much time, just zip it and give us the download link.


18-04-2012 11:07:09

I created a wiki page: