Cr3a70r
13-01-2013 12:32:45
Hello all!
Im using Caelum + Hydrax +OgreTerrain
I finally got to work the Hydrax(there was no watersurface and evevryframe update hydrax didnt help)
There is 2 problems:
1. When i update hydrax every frame it slows down the application
2. I get to see water insanely speed up changing its surface, like every 0.1 second (Screenshots will upload a little bit later, im making a function to take it)
Im using Caelum + Hydrax +OgreTerrain
I finally got to work the Hydrax(there was no watersurface and evevryframe update hydrax didnt help)
There is 2 problems:
1. When i update hydrax every frame it slows down the application
2. I get to see water insanely speed up changing its surface, like every 0.1 second (Screenshots will upload a little bit later, im making a function to take it)
// Create Hydrax object
m_pHydrax = new Hydrax::Hydrax(m_pSceneMgr, m_pCamera, OgreFramework::getSingletonPtr()->m_pRenderWnd->getViewport(0));
// Create our projected grid module
Hydrax::Module::ProjectedGrid *mModule = new Hydrax::Module::ProjectedGrid(// Hydrax parent pointer
m_pHydrax,
// Noise module
new Hydrax::Noise::Perlin(/*Generic one*/),
// Base plane
Ogre::Plane(Ogre::Vector3(0,1,0), Ogre::Vector3(0,10,0)),
// Normal mode
Hydrax::MaterialManager::NM_VERTEX,
// Projected grid options
Hydrax::Module::ProjectedGrid::Options(/*264 /*Generic one*/));
// Set our module
m_pHydrax->setModule(static_cast<Hydrax::Module::Module*>(mModule));
// Load all parameters from config file
// Remarks: The config file must be in Hydrax resource group.
// All parameters can be set/updated directly by code(Like previous versions),
// but due to the high number of customizable parameters, since 0.4 version, Hydrax allows save/load config files.
m_pHydrax->loadCfg("HydraxActual.hdx");
// Create water
m_pHydrax->create();
// Set Hydrax sun position and colour
m_pHydrax->setSunPosition(Ogre::Vector3(0,10000,0));
m_pHydrax->setSunColor(Ogre::Vector3(1, 0.9, 0.6));