i want to create a DIRECTIOOAL LIGHT and rotate that to -90,0,0
so it will light the whole scene.
mine is looking like this : http://img505.imageshack.us/img505/1392/cube3dca2.jpg
i used the code like as this :
Code: Select all
IrrlichtDevice *device = createDevice(EDT_DIRECT3D9,dimension2d<s32>(800,600),32,false,true,false,0);
device->setWindowCaption(L"Hello World Program");
IVideoDriver* driver = device->getVideoDriver();
ISceneManager* smngr = device->getSceneManager();
IGUIEnvironment* guienv = device->getGUIEnvironment();
smngr->addLightSceneNode(0,vector3df(0,100,-100),SColorf(1.0,1.0,1.0),1000.0,1);
smngr->addCameraSceneNode(0,vector3df(0,0,-5),vector3df(0,0,0));
ISceneNode* node = smngr->addCubeSceneNode(1,0,-1,vector3df(0.0f,0.0f,0.0f));
while(device->run())
{
driver->beginScene(true,true,SColor(255,0,0,0));
node->setRotation(vector3df(node->getRotation().X+0.1,node->getRotation().Y+0.1,0));
smngr->drawAll();
driver->endScene();
}
device->drop();