Shader subroutine related funcs added

This commit is contained in:
Julien Valentin 2016-06-09 10:48:05 +01:00 committed by Robert Osfield
parent 7ccf16b83d
commit ac26ba7e5b
2 changed files with 14 additions and 0 deletions

View File

@ -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 * glBlitFramebuffer) (GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum);
void (GL_APIENTRY * glGetRenderbufferParameteriv) (GLenum, GLenum, GLint*); 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 // Sync
GLsync (GL_APIENTRY * glFenceSync) (GLenum condition, GLbitfield flags); GLsync (GL_APIENTRY * glFenceSync) (GLenum condition, GLbitfield flags);

View File

@ -1040,6 +1040,13 @@ GLExtensions::GLExtensions(unsigned int contextID)
(isGLExtensionSupported(contextID, "GL_EXT_packed_depth_stencil")) || (isGLExtensionSupported(contextID, "GL_EXT_packed_depth_stencil")) ||
(isGLExtensionSupported(contextID, "GL_OES_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 // Sync
osg::setGLExtensionFuncPtr(glFenceSync, "glFenceSync"); osg::setGLExtensionFuncPtr(glFenceSync, "glFenceSync");