Just a query, but, with this new release of Ogre 1-8-0, is there some changes I'm missing for modifying parameters to shaders from within the engine ?
I compile up my engine, and it compiles fine, if I set it to not modify the parameters it works (looks like crap but runs fine), I set it to modify the parameters and it locks up, no log messages, just an exception, and stops working (the usual windows box pops up with a progress bar in it, saying the program has stopped).
Code: Select all
Ogre::GpuProgramParametersSharedPtr vparams = CloudEntity->getSubEntity(0)->getTechnique()->getPass(0)->getVertexProgramParameters();
Ogre::GpuProgramParametersSharedPtr fparams = skyEntity->getSubEntity(0)->getTechnique()->getPass(0)->getFragmentProgramParameters();
vparams->setNamedConstant("UnderClouds", Ogre::Vector4( separation, (float)nitpcount, CloudAlt, Altitude));
fparams->setNamedConstant("BoundSky", Ogre::Vector4(MaxHeight, PlanetRadius, AtmoHeight, Altitude));
P.S. These parameters change on a frame by frame basis, and the compile of the shader is fine, no missing parameters or anything silly like that, OH, and the shader is written in cg.
P.P.S OH yeah, I use the iteration XX for pass 0 as well in the cloud material defenition.
Alex