I have a variable of type UniformParameterPtr decalared by Ogre and I want to get its value.
What is the right way to this?
I tried the method .get() but it doesn't really give the value.
something else?


1 Answer 1


UniformParameterPtr is a typedef for Ogre::SharedPtr<UniformParameter>. With Ogre::SharedPtr the behavior is always the same:

You can retrieve the actual object instance that is encapsulated in the shared pointer via get(), which would in your case give you an UniformParameter instance.

Alternatively you can directly access the members of the object encapsulated in the shared pointer via -> as if it were a regular pointer.

  • \$\begingroup\$ I tried what you suggested but it didnt work. I need to get the alpharejectfunction value from ` mPSAlphaFunc` ? can you show me the code to do this? \$\endgroup\$
    – arii
    Nov 20, 2016 at 11:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .