21 #include "CaelumPrecompiled.h" 28 FastGpuParamRef::FastGpuParamRef(Ogre::GpuProgramParametersSharedPtr paramsPtr,
const Ogre::String& name)
30 this->bind(paramsPtr, name);
33 void FastGpuParamRef::bind(
34 Ogre::GpuProgramParametersSharedPtr params,
35 const Ogre::String& name,
38 assert(!params.isNull());
39 #if CAELUM_DEBUG_PARAM_REF 42 const GpuConstantDefinition* def = params->_findNamedConstantDefinition(name, throwIfNotFound);
44 mPhysicalIndex = def->physicalIndex;
45 assert(this->isBound());
47 mPhysicalIndex = InvalidPhysicalIndex;
48 assert(!this->isBound());
52 void FastGpuParamRef::unbind() {
53 #if CAELUM_DEBUG_PARAM_REF 56 mPhysicalIndex = InvalidPhysicalIndex;
57 assert(!this->isBound());