Problems when loading a new scene

kintaro

30-05-2006 20:56:52

Hi, I had changed from OGRE 1.0.7 to Ogre 1.2.0, and the I had a problem with my program. In my program when I press a key it clears the actual scene and lods a new one, but now in the new ogre it's is not working. Below there is the peace of code that loads the new scene and the error from log file.


mSceneMgr->clearScene();

oSceneCallback oe_Callback_2;

// Initialises with the scene to be loaded and the callback if requiered
oScene.initialise("interior.osm", &oe_Callback_2);

// create and setup the scene in the root node
oScene.createScene();


mSceneMgr = oScene.getSceneManager();


// Create a default camera in case no cameras were saved in the scene
mCamera = mSceneMgr->createCamera("NewCam");
// Position it at 500 in Z direction
//mCamera->setPosition(Vector3(0,0,500));
// Look back along -Z
//mCamera->lookAt(Vector3(0,0,-300));
mCamera->setNearClipDistance(5);

// Create one viewport, entire window
vp->setCamera(mCamera);
vp->setBackgroundColour(ColourValue(0,0,0));

// Alter the camera aspect ratio to match the viewport
mCamera->setAspectRatio(Real(vp->getActualWidth()) / Real(vp->getActualHeight()));



Log file:
-----------------------------------
Details:
-----------------------------------
Error #: 7
Function: GpuProgramParameters::getParamIndex
Description: Cannot find a parameter named lightSpecularColor.
File: c:\programming\ogre\ogrenew\ogremain\src\ogregpuprogram.cpp
Line: 768
Stack unwinding: <<beginning of stack>>
16:12:16: Error at line 29 of deferred_post_minilight.hlsl.program: Invalid param_named_auto attribute - An exception has been thrown!


Thanks for help

BergBoy

30-05-2006 23:55:42

mSceneMgr = oScene.getSceneManager()

(sorry if im wrong but im in a rush but I want to help...)

If I recall u need to make a scene manager in Dagon (if u dont have one). So dont forget that. Since you have a log file im assuming youve gotten it compiling and theoretically working so that probbly isnt the issue:

-----------------------------------
Details:
-----------------------------------
Error #: 7
Function: GpuProgramParameters::getParamIndex
Description: Cannot find a parameter named lightSpecularColor.
File: c:\programming\ogre\ogrenew\ogremain\src\ogregpuprogram.cpp
Line: 768
Stack unwinding: <<beginning of stack>>
16:12:16: Error at line 29 of deferred_post_minilight.hlsl.program: Invalid param_named_auto attribute - An exception has been thrown!


Ive been getting this error all the time. Nothing major to my knowledge and it wont ruin your program (might be wrong but its never affected me).

If its flat out not loading and its blank, try examining ur scene manager/s because I had some issues when I was upgrading (tho this was before the Dagon scene Loader was released - if your using that it should be working - but its going to make a SECOND scene manager if I remember. It actually makes a scene manager. Dont qoute me on taht im kinda trying to remember. Double check that. Basically its generally making your FIRST scene manager but if u already had one it makes a second one... so yeah, I had some issues with my program originally til I resolved that because I had GUIS using one manager and the scene with another and some entities made with another... might wanna look into that)