Beispiel #1
0
    bool frameRenderingQueued(const FrameEvent& evt)
    {
        // update uniform buffer value
        Real seconds = Root::getSingleton().getTimer()->getMilliseconds()/1000.0f;
        GpuSharedParametersPtr param = GpuProgramManager::getSingleton().getSharedParameters("DataBlock");
        param->setNamedConstant("roll", seconds);

        return SdkSample::frameRenderingQueued(evt); 
    }
Beispiel #2
0
void ShadowManager::setManagedMaterialSplitPoints(Ogre::PSSMShadowCameraSetup::SplitPointList splitPointList)
{
    Ogre::Vector4 splitPoints;

    for (int i = 0; i < 3; ++i)
        splitPoints[i] = splitPointList[i];

    GpuSharedParametersPtr p = GpuProgramManager::getSingleton().getSharedParameters("pssm_params");
    p->setNamedConstant("pssmSplitPoints", splitPoints);
}