Check GL_NV_framebuffer_multisample_coverage

`isRenderbufferMultisampleCoverageSupported()` should not return true if
the extension is not supported.

Fixes #1028
This commit is contained in:
Gleb Mazovetskiy 2021-03-16 22:13:53 +00:00
parent 34a1d8bc9b
commit 713d6fc357
2 changed files with 5 additions and 4 deletions

View File

@ -138,9 +138,7 @@ void getPossibleConfigs(GraphicsContext* gc, BufferConfigList& colorConfigs,
return;
if (ext->isMultisampleSupported)
glGetIntegerv(GL_MAX_SAMPLES_EXT, &maxSamples);
// isMultisampleCoverageSupported
if (isGLExtensionSupported(contextID,
"GL_NV_framebuffer_multisample_coverage"))
if (ext->isRenderbufferMultisampleCoverageSupported())
{
glGetIntegerv(GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV,
&coverageSampleConfigs);

View File

@ -1094,7 +1094,10 @@ GLExtensions::GLExtensions(unsigned int in_contextID):
setGLExtensionFuncPtr(glGenRenderbuffers, "glGenRenderbuffers", "glGenRenderbuffersEXT", "glGenRenderbuffersOES", validContext);
setGLExtensionFuncPtr(glRenderbufferStorage, "glRenderbufferStorage", "glRenderbufferStorageEXT", "glRenderbufferStorageOES", validContext);
setGLExtensionFuncPtr(glRenderbufferStorageMultisample, "glRenderbufferStorageMultisample", "glRenderbufferStorageMultisampleEXT", "glRenderbufferStorageMultisampleOES", validContext);
setGLExtensionFuncPtr(glRenderbufferStorageMultisampleCoverageNV, "glRenderbufferStorageMultisampleCoverageNV", validContext);
if (isGLExtensionSupported(contextID, "GL_NV_framebuffer_multisample_coverage"))
setGLExtensionFuncPtr(glRenderbufferStorageMultisampleCoverageNV, "glRenderbufferStorageMultisampleCoverageNV", validContext);
else
glRenderbufferStorageMultisampleCoverageNV = NULL;
setGLExtensionFuncPtr(glBindFramebuffer, "glBindFramebuffer", "glBindFramebufferEXT", "glBindFramebufferOES", validContext);
setGLExtensionFuncPtr(glDeleteFramebuffers, "glDeleteFramebuffers", "glDeleteFramebuffersEXT", "glDeleteFramebuffersOES", validContext);
setGLExtensionFuncPtr(glGenFramebuffers, "glGenFramebuffers", "glGenFramebuffersEXT", "glGenFramebuffersOES", validContext);