Added convinience mathod for passing osg::Plane to glUniform

This commit is contained in:
Robert Osfield 2016-11-18 15:21:04 +00:00
parent bbbfa19ce2
commit 7744c44c8a

View File

@ -29,6 +29,7 @@
#include <osg/Vec2ui>
#include <osg/Vec3ui>
#include <osg/Vec4ui>
#include <osg/Plane>
#include <osg/MatrixTemplate>
#include <osg/Matrixd>
#include <osg/Matrixf>
@ -761,6 +762,8 @@ class OSG_EXPORT GLExtensions : public osg::Referenced
inline void glUniform(GLint location, const osg::Vec3d& value) const { glUniform3dv(location, 1, value.ptr()); }
inline void glUniform(GLint location, const osg::Vec4d& value) const { glUniform4dv(location, 1, value.ptr()); }
inline void glUniform(GLint location, const osg::Plane& value) const { glUniform4dv(location, 1, value.ptr()); }
inline void glUniform(GLint location, const osg::Matrix2& value) const { glUniformMatrix2fv(location, 1, GL_FALSE, value.ptr()); }
inline void glUniform(GLint location, const osg::Matrix2x3& value) const { glUniformMatrix2x3fv(location, 1, GL_FALSE, value.ptr()); }
inline void glUniform(GLint location, const osg::Matrix2x4& value) const { glUniformMatrix2x4fv(location, 1, GL_FALSE, value.ptr()); }