1
\$\begingroup\$

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?

\$\endgroup\$
1
\$\begingroup\$

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.

|improve this answer|||||
\$\endgroup\$
  • \$\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 '16 at 11:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.