Code: Select all
smgr->setAmbientLight(video::SColorf(.3f,.3f,.4f,1.0f));
scene::ILightSceneNode* nodeLight = smgr->addLightSceneNode(0, core::vector3df(100, 100, 100),
video::SColorf(1.0f,1.0f,1.0f,1.0f),
20000.0f);
video::SLight light;
light.Direction = core::vector3df(1000,100,1000);
light.Type = video::ELT_DIRECTIONAL;
light.AmbientColor = video::SColorf(0.3f,0.3f,0.4f,1);
light.SpecularColor= video::SColorf(0.4f,0.4f,0.5f,1);
light.DiffuseColor = video::SColorf(1.0f,1.0f,1.0f,1);
light.CastShadows = true;
scene::ISceneNode * temple = smgr->addMeshSceneNode(smgr->getMesh("E:/ALLNEW/Epothy/temple/000_mesh.x"));
temple->setPosition(core::vector3df(512,26.5,512));
// temple->setScale(core::vector3df(20,20,20));
temple->setMaterialFlag(video::EMF_LIGHTING, false);
temple->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, true);