If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
-
flip
- Posts: 5
- Joined: Tue May 19, 2009 9:10 pm
Post
by flip »
So, there's my code copied from an example:
Code: Select all
#include <windows.h>
#include <Irrlicht.h>
#pragma comment(lib, "Irrlicht.lib")
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
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,5));
ICameraSceneNode* cam = smgr->addCameraSceneNodeFPS();
while(device->run() && device) {
video->beginScene(true, true, video::SColor(255,0,0,255));
smgr->drawAll();
video->endScene();
}
}
The problem exist i can't actually see anything on the screen. I think I should use materials and light but how? Yeah I'm totally new with Irrlicht.
-
grassblade
- Posts: 27
- Joined: Mon Jan 09, 2006 11:17 am
Post
by grassblade »
Have you tried to move the camera forward or backward with arrow keys?
-
flip
- Posts: 5
- Joined: Tue May 19, 2009 9:10 pm
Post
by flip »
Oh yeah now I see the cube
So, how do I set material and light to that cube?
-
grassblade
- Posts: 27
- Joined: Mon Jan 09, 2006 11:17 am
Post
by grassblade »
Check the tutorials in the example directory.