diff options
author | cutealien <cutealien@dfc29bdd-3216-0410-991c-e03cc46cb475> | 2020-09-29 20:22:28 +0000 |
---|---|---|
committer | cutealien <cutealien@dfc29bdd-3216-0410-991c-e03cc46cb475> | 2020-09-29 20:22:28 +0000 |
commit | 8b9947f9f6e5444eb34f42eecfa5b4cfdeed25d8 (patch) | |
tree | db04fac888fc72f19fa375a3529f361f36f00dbd /examples/Demo/CDemo.cpp | |
parent | 048aa500b9a999d801ad8b2f7e771b2d8d5b8aad (diff) | |
download | irrlicht-8b9947f9f6e5444eb34f42eecfa5b4cfdeed25d8.tar.xz |
Merging r6128 through r6139 from trunk to ogl-es branch.
Note: I could not merge 2 OSX project files as I'm not sure how to correctly resolve their conflicts.
Maybe old version for those files are still OK, as ogl-es branch got updated once before (leaving trunk behind).
In case it causes problems I hope someone can send another patch for those 2 files:
source/Irrlicht/Irrlicht.xcodeproj/xcshareddata/xcschemes
source/Irrlicht/Irrlicht.xcodeproj/project.pbxproj
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@6140 dfc29bdd-3216-0410-991c-e03cc46cb475
Diffstat (limited to 'examples/Demo/CDemo.cpp')
-rw-r--r-- | examples/Demo/CDemo.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/Demo/CDemo.cpp b/examples/Demo/CDemo.cpp index 6c073ab..b50b6d3 100644 --- a/examples/Demo/CDemo.cpp +++ b/examples/Demo/CDemo.cpp @@ -424,12 +424,13 @@ void CDemo::loadSceneData() model1->setPosition(core::vector3df(100,40,-80));
model1->setScale(core::vector3df(2,2,2));
model1->setMD2Animation(scene::EMAT_STAND);
- model1->setMaterialFlag(video::EMF_LIGHTING, false);
+ model1->setMaterialFlag(video::EMF_LIGHTING, true);
+ model1->getMaterial(0).Shininess = 40.f;
model1->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, true);
model1->setMaterialType(video::EMT_SPHERE_MAP);
model1->setAutomaticCulling(scene::EAC_OFF); // avoid shadows not updating
scene::IShadowVolumeSceneNode * shadVol = model1->addShadowVolumeSceneNode();
- shadVol->setOptimization(scene::ESV_NONE); // Sydney has broken shadows otherwise
+ if(shadVol) shadVol->setOptimization(scene::ESV_NONE); // Sydney has broken shadows otherwise
}
model2 = sm->addAnimatedMeshSceneNode(mesh);
@@ -443,7 +444,7 @@ void CDemo::loadSceneData() model2->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, true);
model2->setAutomaticCulling(scene::EAC_OFF); // avoid shadows not updating
scene::IShadowVolumeSceneNode * shadVol = model2->addShadowVolumeSceneNode();
- shadVol->setOptimization(scene::ESV_NONE); // Sydney has broken shadows otherwise
+ if (shadVol) shadVol->setOptimization(scene::ESV_NONE); // Sydney has broken shadows otherwise
}
}
|