Error in "->loadCfg()"

whiplash

27-03-2010 21:38:46

Hello!

I have error, when i call function loadCfg().

Error line place in "GodRaysManager::_createMaterials(const HydraxComponent& HC)":
Ogre::Pass *GR_Technique0_Pass0 = mMaterials[0]->getTechnique(0)->getPass(0);
Error:
index < mTechniques.size() && "Index out of bounds."
My code:
ResourceGroupManager *rgm = ResourceGroupManager::getSingletonPtr();
rgm->createResourceGroup(m_resource_group); // m_resource_group = "Hydrax"
rgm->addResourceLocation(m_resource_location, "FileSystem", m_resource_group, true);
rgm->initialiseResourceGroup(m_resource_group);

m_hydrax = new Hydrax::Hydrax(m_scene_manager, m_camera, m_viewport);
m_projgrid_module = new Hydrax::Module::ProjectedGrid(m_hydrax, new Hydrax::Noise::Perlin(),
Plane(Vector3::UNIT_Y, 0), Hydrax::MaterialManager::NM_VERTEX, Hydrax::Module::ProjectedGrid::Options());
m_hydrax->setModule(static_cast<Hydrax::Module::Module*>(m_projgrid_module));
m_hydrax->loadCfg("HydraxDemo.hdx");

File HydraxDemo.hdx:
#Hydrax cfg file.

#Hydrax version field
HydraxVersion=0.5.1

#Main options field
<vector3>Position=-5000x100x-5000
<float>PlanesError=10.5
#Shader mode: 0=HLSL, 1=CG, 2=GLSL
<int>ShaderMode=0
<float>FullReflectionDistance=1e+011
<float>GlobalTransparency=0
<float>NormalDistortion=0.075
<vector3>WaterColor=0.139765x0.359464x0.425373

#Components field
Components=Sun|Foam|Depth|Smooth|Caustics|Underwater|UnderwaterReflections|UnderwaterGodRays

#Sun parameters
<vector3>SunPosition=0x10000x0
<float>SunStrength=1.75
<float>SunArea=150
<vector3>SunColor=1x0.9x0.6

#Foam parameters
<float>FoamMaxDistance=7.5e+007
<float>FoamScale=0.0075
<float>FoamStart=0
<float>FoamTransparency=1

#Depth parameters
<float>DepthLimit=90

#Smooth transitions parameters
<float>SmoothPower=5

#Caustics parameters
<float>CausticsScale=135
<float>CausticsPower=10.5
<float>CausticsEnd=0.8

#God rays parameters
<vector3>GodRaysExposure=0.76x2.46x2.29
<float>GodRaysIntensity=0.015
<float>GodRaysSpeed=5
<int>GodRaysNumberOfRays=100
<float>GodRaysRaysSize=0.03
<bool>GodRaysIntersections=false

#Rtt quality field(0x0 = Auto)
<size>Rtt_Quality_Reflection=0x0
<size>Rtt_Quality_Refraction=0x0
<size>Rtt_Quality_Depth=0x0
<size>Rtt_Quality_URDepth=0x0
<size>Rtt_Quality_GPUNormalMap=0x0

#Module options
Module=ProjectedGridVertex

<float>PG_ChoopyStrength=3.75
<bool>PG_ChoppyWaves=true
<int>PG_Complexity=264
<float>PG_Elevation=50
<bool>PG_ForceRecalculateGeometry=false
<bool>PG_Smooth=false
<float>PG_Strength=35

#Noise options
Noise=Perlin

<int>Perlin_Octaves=8
<float>Perlin_Scale=0.085
<float>Perlin_Falloff=0.49
<float>Perlin_Animspeed=1.4
<float>Perlin_Timemulti=1.27
<float>Perlin_GPU_Strength=2
<vector3>Perlin_GPU_LODParameters=0.5x50x150000


Ogre version: 1.7.0
Hydrax version: 0.5.1

Thanks!