diff --git a/src/OpenGl/OpenGl_GlCore45.hxx b/src/OpenGl/OpenGl_GlCore45.hxx index f9e3c55071..804dde35f1 100644 --- a/src/OpenGl/OpenGl_GlCore45.hxx +++ b/src/OpenGl/OpenGl_GlCore45.hxx @@ -134,18 +134,6 @@ public: //! @name OpenGL 4.5 additives to 4.4 using theBaseClass_t::glGetnUniformiv; using theBaseClass_t::glGetnUniformuiv; using theBaseClass_t::glReadnPixels; - using theBaseClass_t::glGetnMapdv; - using theBaseClass_t::glGetnMapfv; - using theBaseClass_t::glGetnMapiv; - using theBaseClass_t::glGetnPixelMapfv; - using theBaseClass_t::glGetnPixelMapuiv; - using theBaseClass_t::glGetnPixelMapusv; - using theBaseClass_t::glGetnPolygonStipple; - using theBaseClass_t::glGetnColorTable; - using theBaseClass_t::glGetnConvolutionFilter; - using theBaseClass_t::glGetnSeparableFilter; - using theBaseClass_t::glGetnHistogram; - using theBaseClass_t::glGetnMinmax; using theBaseClass_t::glTextureBarrier; #endif diff --git a/src/OpenGl/OpenGl_GlFunctions.cxx b/src/OpenGl/OpenGl_GlFunctions.cxx index a66a35d652..0ee1aef309 100644 --- a/src/OpenGl/OpenGl_GlFunctions.cxx +++ b/src/OpenGl/OpenGl_GlFunctions.cxx @@ -1505,26 +1505,30 @@ void OpenGl_GlFunctions::load (OpenGl_Context& theCtx, && FindProcShort (glGetTextureSubImage) && FindProcShort (glGetCompressedTextureSubImage) && FindProcShort (glGetGraphicsResetStatus) - && FindProcShort (glGetnCompressedTexImage) - && FindProcShort (glGetnTexImage) - && FindProcShort (glGetnUniformdv) && FindProcShort (glGetnUniformfv) && FindProcShort (glGetnUniformiv) && FindProcShort (glGetnUniformuiv) && FindProcShort (glReadnPixels) - && FindProcShort (glGetnMapdv) - && FindProcShort (glGetnMapfv) - && FindProcShort (glGetnMapiv) - && FindProcShort (glGetnPixelMapfv) - && FindProcShort (glGetnPixelMapuiv) - && FindProcShort (glGetnPixelMapusv) - && FindProcShort (glGetnPolygonStipple) - && FindProcShort (glGetnColorTable) - && FindProcShort (glGetnConvolutionFilter) - && FindProcShort (glGetnSeparableFilter) - && FindProcShort (glGetnHistogram) - && FindProcShort (glGetnMinmax) && FindProcShort (glTextureBarrier); + bool hasGetnTexImage = has45 + && FindProcShort (glGetnCompressedTexImage) + && FindProcShort (glGetnTexImage) + && FindProcShort (glGetnUniformdv); + if (has45 && !hasGetnTexImage) + { + // Intel driver exports only ARB-suffixed functions in a violation to OpenGL 4.5 specs + hasGetnTexImage = checkExtensionShort ("GL_ARB_robustness") + && theCtx.FindProc ("glGetnCompressedTexImageARB", this->glGetnCompressedTexImage) + && theCtx.FindProc ("glGetnTexImageARB", this->glGetnTexImage) + && theCtx.FindProc ("glGetnUniformdvARB", this->glGetnUniformdv); + has45 = hasGetnTexImage; + if (hasGetnTexImage) + { + Message::SendTrace() << "Warning! glGetnCompressedTexImage function required by OpenGL 4.5 specs is not found.\n" + "A non-standard glGetnCompressedTexImageARB fallback will be used instead.\n" + "Please report this issue to OpenGL driver vendor '" << theCtx.myVendor << "'."; + } + } if (has45) { theCtx.core45 = (OpenGl_GlCore45* )this; @@ -1537,9 +1541,26 @@ void OpenGl_GlFunctions::load (OpenGl_Context& theCtx, has46 = isGlGreaterEqualShort (4, 6) && FindProcShort (glSpecializeShader) - && FindProcShort (glMultiDrawArraysIndirectCount) - && FindProcShort (glMultiDrawElementsIndirectCount) && FindProcShort (glPolygonOffsetClamp); + + bool hasIndParams = has46 + && FindProcShort (glMultiDrawArraysIndirectCount) + && FindProcShort (glMultiDrawElementsIndirectCount); + if (has46 && !hasIndParams) + { + // Intel driver exports only ARB-suffixed functions in a violation to OpenGL 4.6 specs + hasIndParams = checkExtensionShort ("GL_ARB_indirect_parameters") + && theCtx.FindProc ("glMultiDrawArraysIndirectCountARB", this->glMultiDrawArraysIndirectCount) + && theCtx.FindProc ("glMultiDrawElementsIndirectCountARB", this->glMultiDrawElementsIndirectCount); + has46 = hasIndParams; + if (hasIndParams) + { + Message::SendTrace() << "Warning! glMultiDrawArraysIndirectCount function required by OpenGL 4.6 specs is not found.\n" + "A non-standard glMultiDrawArraysIndirectCountARB fallback will be used instead.\n" + "Please report this issue to OpenGL driver vendor '" << theCtx.myVendor << "'."; + } + } + if (has46) { theCtx.core46 = (OpenGl_GlCore46* )this; diff --git a/src/OpenGl/OpenGl_GlFunctions.hxx b/src/OpenGl/OpenGl_GlFunctions.hxx index a8be687e88..adbe897e14 100644 --- a/src/OpenGl/OpenGl_GlFunctions.hxx +++ b/src/OpenGl/OpenGl_GlFunctions.hxx @@ -1693,18 +1693,6 @@ public: //! @name OpenGL 4.5 PFNGLGETNUNIFORMIVPROC glGetnUniformiv; PFNGLGETNUNIFORMUIVPROC glGetnUniformuiv; PFNGLREADNPIXELSPROC glReadnPixels; - PFNGLGETNMAPDVPROC glGetnMapdv; - PFNGLGETNMAPFVPROC glGetnMapfv; - PFNGLGETNMAPIVPROC glGetnMapiv; - PFNGLGETNPIXELMAPFVPROC glGetnPixelMapfv; - PFNGLGETNPIXELMAPUIVPROC glGetnPixelMapuiv; - PFNGLGETNPIXELMAPUSVPROC glGetnPixelMapusv; - PFNGLGETNPOLYGONSTIPPLEPROC glGetnPolygonStipple; - PFNGLGETNCOLORTABLEPROC glGetnColorTable; - PFNGLGETNCONVOLUTIONFILTERPROC glGetnConvolutionFilter; - PFNGLGETNSEPARABLEFILTERPROC glGetnSeparableFilter; - PFNGLGETNHISTOGRAMPROC glGetnHistogram; - PFNGLGETNMINMAXPROC glGetnMinmax; PFNGLTEXTUREBARRIERPROC glTextureBarrier; public: //! @name OpenGL 4.6