core_programmer
19-10-2008 20:12:02
I got hydrax running under Ogre 1.4.9, however I am unable to use it. If I load the components from Tropical.hdx (from the editor) or manualy with mHydrax->setComponents I simply get a black screen. What could be wrong? (I suggest that it has something to do with the depth Component, because if I only load this component i get an black scrren and with other not...)
If I don't load a cfg and just use this code everything works great, except that there are not any options set, so it looks rather unimpressive....
Here's the code i was taking about:
Hydrax::Module::ProjectedGrid *mModule
= new Hydrax::Module::ProjectedGrid(// Hydrax parent pointer
mHydraxSystem,
// Noise module
new Hydrax::Noise::Perlin(/*Generic one*/),
// Base plane
Ogre::Plane(Ogre::Vector3(0,1,0), Ogre::Vector3(0,0,0)),
// Normal mode
Hydrax::MaterialManager::NM_VERTEX,
// Projected grid options
Hydrax::Module::ProjectedGrid::Options(256));
mHydraxSystem->setModule(static_cast<Hydrax::Module::Module*>(mModule));
//mHydraxSystem->loadCfg("Tropical.hdx");
mHydraxSystem->create();
mSceneMgr->setWorldGeometry("Island.cfg");
mHydraxSystem->getMaterialManager()->addDepthTechnique(
static_cast<Ogre::MaterialPtr>(Ogre::MaterialManager::getSingleton().getByName("Island"))
->createTechnique());
I'm currently using the latest version from hydrax!
If somebody has any idea what's wrong I would be happy hearing about it.
If I don't load a cfg and just use this code everything works great, except that there are not any options set, so it looks rather unimpressive....
Here's the code i was taking about:
Hydrax::Module::ProjectedGrid *mModule
= new Hydrax::Module::ProjectedGrid(// Hydrax parent pointer
mHydraxSystem,
// Noise module
new Hydrax::Noise::Perlin(/*Generic one*/),
// Base plane
Ogre::Plane(Ogre::Vector3(0,1,0), Ogre::Vector3(0,0,0)),
// Normal mode
Hydrax::MaterialManager::NM_VERTEX,
// Projected grid options
Hydrax::Module::ProjectedGrid::Options(256));
mHydraxSystem->setModule(static_cast<Hydrax::Module::Module*>(mModule));
//mHydraxSystem->loadCfg("Tropical.hdx");
mHydraxSystem->create();
mSceneMgr->setWorldGeometry("Island.cfg");
mHydraxSystem->getMaterialManager()->addDepthTechnique(
static_cast<Ogre::MaterialPtr>(Ogre::MaterialManager::getSingleton().getByName("Island"))
->createTechnique());
I'm currently using the latest version from hydrax!
If somebody has any idea what's wrong I would be happy hearing about it.