Code: Select all
// HelloUniverse.cpp
// Include the Irrlicht header
#include <irrlicht.h>
// Irrlicht Namespaces
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;
int main()
{
IrrlichtDevice *irrDevice = createDevice(DT_DIRECTX8,
dimension2d<s32>(512, 384),
16,
false,
false,
0);
irrDevice->setWindowCaption(L"Vojkotov testni primer z Irrlicht pogonom!");
IVideoDriver* irrDriver = irrDevice->getVideoDriver();
ISceneManager* irrSceneMgr = irrDevice->getSceneManager();
IGUIEnvironment* irrGUIEnv = irrDevice->getGUIEnvironment();
[b]irrGUIEnv->addStaticText(
L"Krneki",
false,
rect<int>(10,10,500,50));[/b]
irrGUIEnv->addStaticText(
L"Pozdravljen svet! To je Vojkotovo besedilo!",
false,
rect<int>(10,70,500,50));
while(irrDevice->run())
{
irrDriver->beginScene(true, true, SColor(0,255,255,255));
irrSceneMgr->drawAll(); //izrise scene managerja
irrGUIEnv->drawAll(); //izrise GUI
irrDriver->endScene();
}
irrDevice->drop();
return(0);
}