make GpuProgramParameters::setConstant easier to use
Posted: Wed Jul 16, 2008 1:23 am
Hi,
The goal:
Have a function that provides the uniform index when the uniform name is known, much like glGetUniformLocation, so that GpuProgramParameters::setConstant can be used.
I'm not even sure yet that it is possible to use GpuProgramParameters::setConstant, unless you are comfortable when blindly guessing the value to pass for the "index" parameter. I think Ogre should have an easy to use function, maybe called 'GpuProgramParameters::getUniformLocationFromName' so that you will be able to figure out which value should be passed to GpuProgramParameters::setConstant. I've been trying to implement something like this for the past day, but if someone knows already, the solution would be much appreciated.
Thanks.
The goal:
Have a function that provides the uniform index when the uniform name is known, much like glGetUniformLocation, so that GpuProgramParameters::setConstant can be used.
I'm not even sure yet that it is possible to use GpuProgramParameters::setConstant, unless you are comfortable when blindly guessing the value to pass for the "index" parameter. I think Ogre should have an easy to use function, maybe called 'GpuProgramParameters::getUniformLocationFromName' so that you will be able to figure out which value should be passed to GpuProgramParameters::setConstant. I've been trying to implement something like this for the past day, but if someone knows already, the solution would be much appreciated.
Thanks.