IrrlichtML CGUITTFont addition..
Posted: Sun Jul 04, 2010 6:45 am
I recently found out the IrrlichtML project is still continuosly
updating to the newest Irrlicht version, I am so happy
http://etwas.wolfish.org/Irrlicht/irrlichtml_en.html
In my project I used their code to pump out font textures which can
be used on a simple plane in 3D, so I can make those text scale, rotate,
moving and changing color blending the way like I would do to any other
scene nodes. But in their newest update I found out that the code base
changed too much in the last year, so I have to rewrite my code too.
Basically I have no knowledge about FreeType lib usage, so I just
mimic what they did in the CGUITTFont::draw() method, just instead of
calling driver->Draw2DImage, I setup planes and scene nodes and return
them in a method called CGUITFont::addTextSceneNode()
There's a little naming differences between my code snippet below
and the original IrrlichtML's CGUITTFont and I actually did some
refactoring (added IGUITTFont interface which extends IGUIFont).
I hold no warranty of this code, use this at your own risk.
*UPDATE*
The original code here was removed. please checkout my git repository,
although it is still a mess..
http://github.com/arch-jslin/Irrlicht/b ... UITTFont.h
http://github.com/arch-jslin/Irrlicht/b ... UITTFont.h
http://github.com/arch-jslin/Irrlicht/b ... TTFont.cpp
and possibly
http://github.com/arch-jslin/Irrlicht/b ... onment.cpp
about the addFont part.
New screenies:


updating to the newest Irrlicht version, I am so happy

http://etwas.wolfish.org/Irrlicht/irrlichtml_en.html
In my project I used their code to pump out font textures which can
be used on a simple plane in 3D, so I can make those text scale, rotate,
moving and changing color blending the way like I would do to any other
scene nodes. But in their newest update I found out that the code base
changed too much in the last year, so I have to rewrite my code too.
Basically I have no knowledge about FreeType lib usage, so I just
mimic what they did in the CGUITTFont::draw() method, just instead of
calling driver->Draw2DImage, I setup planes and scene nodes and return
them in a method called CGUITFont::addTextSceneNode()
There's a little naming differences between my code snippet below
and the original IrrlichtML's CGUITTFont and I actually did some
refactoring (added IGUITTFont interface which extends IGUIFont).
I hold no warranty of this code, use this at your own risk.
*UPDATE*
The original code here was removed. please checkout my git repository,
although it is still a mess..
http://github.com/arch-jslin/Irrlicht/b ... UITTFont.h
http://github.com/arch-jslin/Irrlicht/b ... UITTFont.h
http://github.com/arch-jslin/Irrlicht/b ... TTFont.cpp
and possibly
http://github.com/arch-jslin/Irrlicht/b ... onment.cpp
about the addFont part.
New screenies:

