devcpp tut code fix

A forum to store posts deemed exceptionally wise and useful
Post Reply
MarkSA

devcpp tut code fix

Post by MarkSA »

This is the devcpp tutorial fix code.
I couldn't get the tutorial to compile and I made some changes.


// 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(EDT_SOFTWARE,
dimension2d<s32>(512, 384),
16,
false,
false,
0);

irrDevice->setWindowCaption(L"Dev-C++ and the Irrlicht Engine!");

IVideoDriver* irrDriver = irrDevice->getVideoDriver();
ISceneManager* irrSceneMgr = irrDevice->getSceneManager();
IGUIEnvironment* irrGUIEnv = irrDevice->getGUIEnvironment();

irrGUIEnv->addStaticText(L"Hello World! This is the Irrlicht software engine!",

rect<int>(10,10,200,30),true );

while(irrDevice->run())
{
irrDriver->beginScene(true, true, SColor(0,192,192,192));

irrSceneMgr->drawAll();
irrGUIEnv->drawAll();

irrDriver->endScene();
}

irrDevice->drop();

return(0);
}
Post Reply