Heres the world creation code, I took out the irrelevant parts, I think it should be easy enough to figure out.
Code: Select all
void WORLD::createWorld(const c8 * heightmap, const c8 * texture, const c8 * detail)
{
...
terrain = device->getTerrain(heightmap);
// smgr->addTerrainSceneNode(...);
terrain->setScale(vector3df(500, 7.0f, 500));
terrain->setMaterialFlag(EMF_LIGHTING, false);
terrain->setMaterialTexture(0, device->getTexture(texture));
terrain->setMaterialTexture(1, device->getTexture(detail));
terrain->setMaterialType(EMT_DETAIL_MAP);
terrain->scaleTexture(1.0f, 40.0f);
terrain->setMaterialFlag(EMF_FOG_ENABLE, true);
device->getDriver()->setFog(SColor(100, 200, 200, 225), true, 50.0f, 40000.0f, 0.01f, false, false);
device->getSceneManager()->addSkyDomeSceneNode(device->getTexture("resources/texture/sky.jpg"), 50, 50, 1, 1);
device->log("World Created\n");
};