From e7ce7c052914ed593268e325d2aacd8806dcc480 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 14 Apr 2005 20:05:16 +0000 Subject: [PATCH] Fixed getUniformLocation and getAttribLocation methods --- include/osg/State | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/osg/State b/include/osg/State index ed6042964..3c122d556 100644 --- a/include/osg/State +++ b/include/osg/State @@ -665,8 +665,8 @@ class OSG_EXPORT State : public Referenced void setLastAppliedProgramObject(const Program::PerContextProgram* program) { _lastAppliedProgramObject = program; } const Program::PerContextProgram* getLastAppliedProgramObject() const { return _lastAppliedProgramObject; } - inline GLint getUniformLocation( const std::string& name ) const { return _lastAppliedProgramObject ? getUniformLocation(name) : -1; } - inline GLint getAttribLocation( const std::string& name ) const { return _lastAppliedProgramObject ? getAttribLocation(name) : -1; } + inline GLint getUniformLocation( const std::string& name ) const { return _lastAppliedProgramObject ? _lastAppliedProgramObject->getUniformLocation(name) : -1; } + inline GLint getAttribLocation( const std::string& name ) const { return _lastAppliedProgramObject ? _lastAppliedProgramObject->getAttribLocation(name) : -1; } /** Set the current OpenGL context uniqueID. Note, it is the application developers responsibility to