glInvalidateFramebuffer added to GLExtensions
This commit is contained in:
parent
fefabb6c2b
commit
51fee80224
@ -657,6 +657,7 @@ class OSG_EXPORT GLExtensions : public osg::Referenced
|
|||||||
bool isFrameBufferObjectSupported;
|
bool isFrameBufferObjectSupported;
|
||||||
bool isPackedDepthStencilSupported;
|
bool isPackedDepthStencilSupported;
|
||||||
bool isMultisampledRenderToTextureSupported;
|
bool isMultisampledRenderToTextureSupported;
|
||||||
|
bool isInvalidateFramebufferSupported;
|
||||||
|
|
||||||
bool isRenderbufferMultisampleSupported() const { return glRenderbufferStorageMultisample != 0; }
|
bool isRenderbufferMultisampleSupported() const { return glRenderbufferStorageMultisample != 0; }
|
||||||
bool isRenderbufferMultisampleCoverageSupported() const { return glRenderbufferStorageMultisampleCoverageNV != 0; }
|
bool isRenderbufferMultisampleCoverageSupported() const { return glRenderbufferStorageMultisampleCoverageNV != 0; }
|
||||||
@ -683,6 +684,7 @@ class OSG_EXPORT GLExtensions : public osg::Referenced
|
|||||||
|
|
||||||
void (GL_APIENTRY * glGenerateMipmap) (GLenum);
|
void (GL_APIENTRY * glGenerateMipmap) (GLenum);
|
||||||
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 * glInvalidateFramebuffer) (GLenum, GLsizei, const GLenum*); // GL_ARB_invalidate_subdata or GL 4.3 or GLES 3
|
||||||
void (GL_APIENTRY * glGetRenderbufferParameteriv) (GLenum, GLenum, GLint*);
|
void (GL_APIENTRY * glGetRenderbufferParameteriv) (GLenum, GLenum, GLint*);
|
||||||
|
|
||||||
//ARB_framebuffer_no_attachments
|
//ARB_framebuffer_no_attachments
|
||||||
|
@ -1077,6 +1077,9 @@ GLExtensions::GLExtensions(unsigned int in_contextID):
|
|||||||
|
|
||||||
|
|
||||||
// FrameBufferObject
|
// FrameBufferObject
|
||||||
|
isMultisampledRenderToTextureSupported = validContext && isGLExtensionSupported(contextID, "GL_EXT_multisampled_render_to_texture");
|
||||||
|
isInvalidateFramebufferSupported = validContext && (isGLExtensionSupported(contextID, "GL_ARB_invalidate_subdata") || (OSG_GLES2_FEATURES && glVersion >= 3.0) || (OSG_GL2_FEATURES && glVersion >= 4.3));
|
||||||
|
|
||||||
setGLExtensionFuncPtr(glBindRenderbuffer, "glBindRenderbuffer", "glBindRenderbufferEXT", "glBindRenderbufferOES", validContext);
|
setGLExtensionFuncPtr(glBindRenderbuffer, "glBindRenderbuffer", "glBindRenderbufferEXT", "glBindRenderbufferOES", validContext);
|
||||||
setGLExtensionFuncPtr(glDeleteRenderbuffers, "glDeleteRenderbuffers", "glDeleteRenderbuffersEXT", "glDeleteRenderbuffersOES", validContext);
|
setGLExtensionFuncPtr(glDeleteRenderbuffers, "glDeleteRenderbuffers", "glDeleteRenderbuffersEXT", "glDeleteRenderbuffersOES", validContext);
|
||||||
setGLExtensionFuncPtr(glGenRenderbuffers, "glGenRenderbuffers", "glGenRenderbuffersEXT", "glGenRenderbuffersOES", validContext);
|
setGLExtensionFuncPtr(glGenRenderbuffers, "glGenRenderbuffers", "glGenRenderbuffersEXT", "glGenRenderbuffersOES", validContext);
|
||||||
@ -1106,6 +1109,7 @@ GLExtensions::GLExtensions(unsigned int in_contextID):
|
|||||||
|
|
||||||
setGLExtensionFuncPtr(glGenerateMipmap, "glGenerateMipmap", "glGenerateMipmapEXT", "glGenerateMipmapOES", validContext);
|
setGLExtensionFuncPtr(glGenerateMipmap, "glGenerateMipmap", "glGenerateMipmapEXT", "glGenerateMipmapOES", validContext);
|
||||||
setGLExtensionFuncPtr(glBlitFramebuffer, "glBlitFramebuffer", "glBlitFramebufferEXT", "glBlitFramebufferOES", validContext);
|
setGLExtensionFuncPtr(glBlitFramebuffer, "glBlitFramebuffer", "glBlitFramebufferEXT", "glBlitFramebufferOES", validContext);
|
||||||
|
setGLExtensionFuncPtr(glInvalidateFramebuffer, "glInvalidateFramebuffer", "glInvalidateFramebufferEXT", validContext);
|
||||||
setGLExtensionFuncPtr(glGetRenderbufferParameteriv, "glGetRenderbufferParameteriv", "glGetRenderbufferParameterivEXT", "glGetRenderbufferParameterivOES", validContext);
|
setGLExtensionFuncPtr(glGetRenderbufferParameteriv, "glGetRenderbufferParameteriv", "glGetRenderbufferParameterivEXT", "glGetRenderbufferParameterivOES", validContext);
|
||||||
|
|
||||||
|
|
||||||
@ -1130,8 +1134,6 @@ GLExtensions::GLExtensions(unsigned int in_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")));
|
||||||
|
|
||||||
isMultisampledRenderToTextureSupported = validContext && isGLExtensionSupported(contextID, "GL_EXT_multisampled_render_to_texture");
|
|
||||||
|
|
||||||
//subroutine
|
//subroutine
|
||||||
osg::setGLExtensionFuncPtr(glGetSubroutineUniformLocation, "glGetSubroutineUniformLocation", validContext);
|
osg::setGLExtensionFuncPtr(glGetSubroutineUniformLocation, "glGetSubroutineUniformLocation", validContext);
|
||||||
osg::setGLExtensionFuncPtr(glGetActiveSubroutineUniformName, "glGetActiveSubroutineUniformName", validContext);
|
osg::setGLExtensionFuncPtr(glGetActiveSubroutineUniformName, "glGetActiveSubroutineUniformName", validContext);
|
||||||
|
Loading…
Reference in New Issue
Block a user