static unsigned int getNameID(const std::string& name);
_______________________________________________
osg-users mailing list
osg-...@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
On Wed, Dec 8, 2010 at 12:32 PM, Wojciech Lewandowski
<lewan...@ai.com.pl> wrote:
> That solves my problem. I saw this method used inside the code but did not
> notice it is static so I thought it can be used only when we know the
> uniform ptr.
>
> Do you think it makes sense to add following extra method to
> PerContextProgram ?
>
> inline GLint getUniformLocation( const std::string & name )
> {
> return getUniformLocation( osg::Uniform::getNameId( name ) );
> }
For backwards compatibility purposes I have no objection to adding
this method and the above implementation into the OSG. Feel free to
implement, test and post the change to osg-submissions.
Robert.
FTFY. ;-)
/ulrich
-----Oryginalna wiadomość-----
From: Ulrich Hertlein
Sent: Wednesday, December 08, 2010 10:42 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] osgCal does not build - where is
PerContextProgram::getUniformLocation( string ) method ?
On 9/12/10 0:11 , Robert Osfield wrote:
On 9/12/10 9:25 , Wojciech Lewandowski wrote:
> YFTFM ? Where ? When ? WL
Not the code, just the response, sorry.
What I meant was, while you're there it would be nice to put a comment on the function
that describes the pitfalls of using it.
It's easier for the original author to do it (while it's still fresh etc) than for some
spelling/documenting bee to do it afterwards.
/ulrich