diff --git a/include/osg/GLExtensions b/include/osg/GLExtensions index 65e8eb697..39bf312d0 100644 --- a/include/osg/GLExtensions +++ b/include/osg/GLExtensions @@ -571,6 +571,13 @@ class OSG_EXPORT GLExtensions : public osg::Referenced void (GL_APIENTRY * glBlitFramebuffer) (GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum); void (GL_APIENTRY * glGetRenderbufferParameteriv) (GLenum, GLenum, GLint*); + //subroutine + GLint(GL_APIENTRY* glGetSubroutineUniformLocation)( GLuint program, GLenum shadertype, const GLchar *name); + void (GL_APIENTRY * glGetActiveSubroutineUniformName)( GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); + void (GL_APIENTRY * glGetActiveSubroutineUniformiv)( GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values); + GLuint (GL_APIENTRY * glGetSubroutineIndex)( GLuint program, GLenum shadertype, const GLchar *name); + void (GL_APIENTRY * glGetActiveSubroutineName)( GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); + void (GL_APIENTRY * glGetProgramStageiv)( GLuint program, GLenum shadertype, GLenum pname, GLint *values); // Sync GLsync (GL_APIENTRY * glFenceSync) (GLenum condition, GLbitfield flags); diff --git a/src/osg/GLExtensions.cpp b/src/osg/GLExtensions.cpp index 1114d6d13..f5e44fc00 100644 --- a/src/osg/GLExtensions.cpp +++ b/src/osg/GLExtensions.cpp @@ -1040,6 +1040,13 @@ GLExtensions::GLExtensions(unsigned int contextID) (isGLExtensionSupported(contextID, "GL_EXT_packed_depth_stencil")) || (isGLExtensionSupported(contextID, "GL_OES_packed_depth_stencil")); + //subroutine + osg::setGLExtensionFuncPtr(glGetSubroutineUniformLocation, "glGetSubroutineUniformLocation"); + osg::setGLExtensionFuncPtr(glGetActiveSubroutineUniformName, "glGetActiveSubroutineUniformName"); + osg::setGLExtensionFuncPtr(glGetActiveSubroutineUniformiv, "glGetActiveSubroutineUniformiv"); + osg::setGLExtensionFuncPtr(glGetSubroutineIndex, "glGetSubroutineIndex"); + osg::setGLExtensionFuncPtr(glGetActiveSubroutineName, "glGetActiveSubroutineName"); + osg::setGLExtensionFuncPtr(glGetProgramStageiv, "glGetProgramStageiv"); // Sync osg::setGLExtensionFuncPtr(glFenceSync, "glFenceSync");