Hey guys, i went over some Irrlicht tutorials and decided to try and write a small app that displays a cube on the screen. The code i have written compiles but the cube isn't displayed, and even though i tried changing it's position the screen goes eighter black, or stays blue.... Any idea where the problem could be?
Code: Select all
#include <Irrlicht.h>
#pragma comment(lib, "Irrlicht.lib");
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace gui;
int main()
{
IrrlichtDevice *device = createDevice(EDT_OPENGL);
IVideoDriver* video = device->getVideoDriver();
ISceneManager* smgr = device->getSceneManager();
ISceneNode* cube = smgr->addCubeSceneNode();
cube->setPosition(vector3df(0,0,0));
while(device->run() && device)
{
video->beginScene(true, true, video::SColor(255,0,0,255));
smgr->drawAll();
video->endScene();
}
}
Also, i have just moved to Irrlicht from DarkGDK and i am eager to port my project. Right now i am trying to get a hand on the basics and then work on it. My first question would be, how do i get an object position on the X, Y or Z scale? In GDK it was
Code: Select all
dbGetObjectPositionX(objectNumber);
in Irrlicht i position the object using cube->setPosition(vector3d(x,y,z)), but how do i get it's position? Thank you.