MusgooDKZ
19-07-2009 09:43:23
This happens only when grass->update(); function called
{
grass = new PagedGeometry(mCamera, 30);
grass->addDetailLevel<GrassPage>(200);
//Create a GrassLoader object
grassLoader = new GrassLoader(grass);
grass->setPageLoader(grassLoader); //Assign the "treeLoader" to be used to load geometry for the PagedGeometry instance
//Supply a height function to GrassLoader so it can calculate grass Y values
HeightFunction::initialize(mSceneMgr);
grassLoader->setHeightFunction(&HeightFunction::getTerrainHeight);
//Add some grass to the scene with GrassLoader::addLayer()
GrassLayer *l = grassLoader->addLayer("3D-Diggers/plant1sprite");
//Configure the grass layer properties (size, density, animation properties, fade settings, etc.)
l->setMinimumSize(0.3f, 0.3f);
l->setMaximumSize(0.5f, 0.5f);
l->setAnimationEnabled(true); //Enable animations
l->setSwayDistribution(7.0f); //Sway fairly unsynchronized
l->setSwayLength(0.1f); //Sway back and forth 0.5 units in length
l->setSwaySpeed(0.1f); //Sway 1/2 a cycle every second
l->setDensity(10.0f); //Relatively dense grass
l->setRenderTechnique(GRASSTECH_SPRITE);
l->setFadeTechnique(FADETECH_GROW); //Distant grass should slowly raise out of the ground when coming in range
l->setDensityMap("densitymap.png");
l->setMapBounds(TBounds(0, 0, 1400, 1400)); //(0,0)-(1500,1500) is the full boundaries of the terrain
}
{
delete grass->getPageLoader();
delete grass;
}
But i read this bug was fixed. Or i something missed ?
{
grass = new PagedGeometry(mCamera, 30);
grass->addDetailLevel<GrassPage>(200);
//Create a GrassLoader object
grassLoader = new GrassLoader(grass);
grass->setPageLoader(grassLoader); //Assign the "treeLoader" to be used to load geometry for the PagedGeometry instance
//Supply a height function to GrassLoader so it can calculate grass Y values
HeightFunction::initialize(mSceneMgr);
grassLoader->setHeightFunction(&HeightFunction::getTerrainHeight);
//Add some grass to the scene with GrassLoader::addLayer()
GrassLayer *l = grassLoader->addLayer("3D-Diggers/plant1sprite");
//Configure the grass layer properties (size, density, animation properties, fade settings, etc.)
l->setMinimumSize(0.3f, 0.3f);
l->setMaximumSize(0.5f, 0.5f);
l->setAnimationEnabled(true); //Enable animations
l->setSwayDistribution(7.0f); //Sway fairly unsynchronized
l->setSwayLength(0.1f); //Sway back and forth 0.5 units in length
l->setSwaySpeed(0.1f); //Sway 1/2 a cycle every second
l->setDensity(10.0f); //Relatively dense grass
l->setRenderTechnique(GRASSTECH_SPRITE);
l->setFadeTechnique(FADETECH_GROW); //Distant grass should slowly raise out of the ground when coming in range
l->setDensityMap("densitymap.png");
l->setMapBounds(TBounds(0, 0, 1400, 1400)); //(0,0)-(1500,1500) is the full boundaries of the terrain
}
{
delete grass->getPageLoader();
delete grass;
}
But i read this bug was fixed. Or i something missed ?