I need to load and unload fonts at run-time.
I write next:
Code: Select all
#include "../irrlicht-trunk/include/irrlicht.h"
#pragma comment (lib, "../irrlicht-trunk/lib/Win32-visualstudio/Irrlicht.lib")
using namespace irr;
void main(int argc, char** argv)
{
IrrlichtDevice* device = createDevice(video::EDT_OPENGL, core::dimension2du(720, 480));
gui::IGUIEnvironment* guiEnv = device->getGUIEnvironment();
gui::IGUIFont* font = 0;
font = guiEnv->getFont("../irrlicht-trunk/media/fontcourier.bmp");
guiEnv->removeFont(font);
font = guiEnv->getFont("../irrlicht-trunk/media/fontcourier.bmp"); // Access violation reading location 0x00000000.
guiEnv->removeFont(font);
device->drop();
}
SpriteBank is null there.315: if (c == colorTopLeft)
316: {
317: image->setPixel(pos.X, pos.Y, colorBackGroundTransparent);
318: SpriteBank->getPositions().push_back(core::rect<s32>(pos, pos));
319: }
Thanks for any help!