From 7744c44c8aab52bf357820bbe3e506c7cd1ce932 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 18 Nov 2016 15:21:04 +0000 Subject: [PATCH] Added convinience mathod for passing osg::Plane to glUniform --- include/osg/GLExtensions | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/osg/GLExtensions b/include/osg/GLExtensions index 6ee9ca1a5..66a013445 100644 --- a/include/osg/GLExtensions +++ b/include/osg/GLExtensions @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -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()); }