diff --git a/src/glimports.h b/src/glimports.h index 7e3e21b3..e7cc3fc6 100644 --- a/src/glimports.h +++ b/src/glimports.h @@ -301,8 +301,8 @@ GL_IMPORT______(true, PFNGLGETDEBUGMESSAGELOGPROC, glGetDebugMes GL_IMPORT______(false, PFNGLGETERRORPROC, glGetError); GL_IMPORT______(false, PFNGLGETFLOATVPROC, glGetFloatv); GL_IMPORT______(false, PFNGLGETINTEGERVPROC, glGetIntegerv); -GL_IMPORT______(false, PFNGLGETINTERNALFORMATIVPROC, glGetInternalformativ); -GL_IMPORT______(false, PFNGLGETINTERNALFORMATI64VPROC, glGetInternalformati64v); +GL_IMPORT______(true, PFNGLGETINTERNALFORMATIVPROC, glGetInternalformativ); +GL_IMPORT______(true, PFNGLGETINTERNALFORMATI64VPROC, glGetInternalformati64v); GL_IMPORT______(true, PFNGLGETOBJECTLABELPROC, glGetObjectLabel); GL_IMPORT______(true, PFNGLGETOBJECTPTRLABELPROC, glGetObjectPtrLabel); GL_IMPORT______(true, PFNGLGETPOINTERVPROC, glGetPointerv); diff --git a/src/renderer_gl.cpp b/src/renderer_gl.cpp index aaf28c65..a37ba9cb 100644 --- a/src/renderer_gl.cpp +++ b/src/renderer_gl.cpp @@ -1603,24 +1603,26 @@ namespace bgfx { namespace gl if (NULL != glGetInternalformativ) { GLint maxSamples; - GL_CHECK(glGetInternalformativ(GL_RENDERBUFFER + glGetInternalformativ(GL_RENDERBUFFER , s_textureFormat[ii].m_internalFmt , GL_SAMPLES , 1 , &maxSamples - ) ); - supported |= maxSamples > 0 + ); + GLenum err = glGetError(); + supported |= 0 == err && maxSamples > 0 ? BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER_MSAA : BGFX_CAPS_FORMAT_TEXTURE_NONE ; - GL_CHECK(glGetInternalformativ(GL_TEXTURE_2D_MULTISAMPLE + glGetInternalformativ(GL_TEXTURE_2D_MULTISAMPLE , s_textureFormat[ii].m_internalFmt , GL_SAMPLES , 1 , &maxSamples - ) ); - supported |= maxSamples > 0 + ); + err = glGetError(); + supported |= 0 == err && maxSamples > 0 ? BGFX_CAPS_FORMAT_TEXTURE_MSAA : BGFX_CAPS_FORMAT_TEXTURE_NONE ;