XPomJon
18-02-2007 11:46:45
I'm posting this in this and the Ogre Help forum because I'm not sure if the problem is in Ogre or PagingLandScape and whether it's a bug or something that I've done incorrectly ( the last is the most likely.)
I'm using the Ogre Tutorial 3 as a test bed for PLSM2 changing the code as follows:-
Running this change results in a crash.
Ogre.log (part)
Although the log points to the fault being in OgreGpuProgram.cpp I would have thought that this would have been covered by the functions at lines 1120-1135 in OgrePagingLandScapeRenderable.cpp:-
and at lines 144-161 in OgrePagingLandScapeTexture.cpp:-
I would be grateful for any help, tips or advice to resolve this question.
For information I'm using Linux, Kdevelop to build and run the tutorial. Ogre (version 1.2.5) and paginglandscape were both downloaded from CVS and installed in the same top directory (Ogre/Ogrenew & Ogre/paginglandscape) using the usual ./configure&&make &&make install routine.
Thanks............
I'm using the Ogre Tutorial 3 as a test bed for PLSM2 changing the code as follows:-
protected:
void chooseSceneManager(void)
{
mSceneMgr = mRoot->createSceneManager(ST_EXTERIOR_REAL_FAR);
}
void createScene(void)
{
mSceneMgr->setWorldGeometry( "paginglandscape2.cfg" );
mSceneMgr->setSkyDome( true, "Examples/CloudySky", 5, 8 );
}
Running this change results in a crash.
Ogre.log (part)
17:11:51: Added resource location '../../../../paginglandscape/Samples/Media/paginglandscape2/terrains/hf129_3' of type 'FileSystem' to resource group 'PLSM2'
17:11:51: Initialising resource group PLSM2
17:11:51: Texture: clouds.jpg: Loading 1 faces(PF_B8G8R8,256x256x1) with 8 hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,256x256x1.
17:11:51: Viewport for camera 'PlayerCam', actual dimensions L: 0 T: 0 W: 1024 H: 722
17:11:51: An exception has been thrown!
-----------------------------------
Details:
-----------------------------------
Error #: 7
Function: GpuProgramParameters::getParamIndex
Description: Cannot find a parameter named compressionSettings.
File: OgreGpuProgram.cpp
Line: 837
Stack unwinding: <<beginning of stack>>
17:11:51: Unregistering ResourceManager for type BspLevel
17:11:51: *-*-* OGRE Shutdown
17:11:51: Unregistering ResourceManager for type Compositor
17:11:51: Unregistering ResourceManager for type Font
17:11:51: Unregistering ResourceManager for type Skeleton
17:11:51: Unregistering ResourceManager for type Mesh
17:11:51: Unregistering ResourceManager for type HighLevelGpuProgram
17:11:51: Unloading library /usr/local/lib/OGRE/Plugin_PagingLandScape2
17:11:51: Unloading library /usr/local/lib/OGRE/Plugin_OctreeSceneManager
17:11:51: Unloading library /usr/local/lib/OGRE/Plugin_BSPSceneManager
17:11:51: Unloading library /usr/local/lib/OGRE/Plugin_ParticleFX
17:11:51: Render Target 'OGRE Render Window' Average FPS: 0 Best FPS: 0 Worst FPS: 999
17:11:51: Unregistering ResourceManager for type GpuProgram
17:11:51: ******************************
*** Stopping GLX Subsystem ***
******************************
17:11:51: Unregistering ResourceManager for type Texture
17:11:51: Unloading library /usr/local/lib/OGRE/RenderSystem_GL
17:11:51: Unregistering ResourceManager for type Material
17:11:51: Unloading library libOgrePlatform.so
Although the log points to the fault being in OgreGpuProgram.cpp I would have thought that this would have been covered by the functions at lines 1120-1135 in OgrePagingLandScapeRenderable.cpp:-
void PagingLandScapeRenderable::_updateCustomGpuParameter(
const GpuProgramParameters::AutoConstantEntry& constantEntry,
GpuProgramParameters* params) const
{
if (constantEntry.data == MORPH_CUSTOM_PARAM_ID)
{
// Update morph LOD factor
//params->setConstant(constantEntry.index, mLODMorphFactor);
params->setNamedConstant("compressionSettings", mCustomGpuParameters);
}
else
{
Renderable::_updateCustomGpuParameter(constantEntry, params);
}
and at lines 144-161 in OgrePagingLandScapeTexture.cpp:-
void PagingLandScapeTexture::bindCompressionSettings(GpuProgramParametersSharedPtr params)
{
GpuProgramParameters::AutoConstantIterator aci = params->getAutoConstantIterator();
bool found = false;
while (aci.hasMoreElements())
{
const GpuProgramParameters::AutoConstantEntry& ace = aci.getNext();
if (ace.paramType == GpuProgramParameters::ACT_CUSTOM &&
ace.data == MORPH_CUSTOM_PARAM_ID)
{
found = true;
}
}
if (!found)
{
params->setNamedAutoConstant("compressionSettings",
GpuProgramParameters::ACT_CUSTOM, MORPH_CUSTOM_PARAM_ID);
}
I would be grateful for any help, tips or advice to resolve this question.
For information I'm using Linux, Kdevelop to build and run the tutorial. Ogre (version 1.2.5) and paginglandscape were both downloaded from CVS and installed in the same top directory (Ogre/Ogrenew & Ogre/paginglandscape) using the usual ./configure&&make &&make install routine.
Thanks............