mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Don't validate shader programs on MacOS X
If the paint event is called before the view is visible, validation of the shader program will cause an error on MacOS X 10.8 and forward, stating that the operation was ignored.
This commit is contained in:
@@ -200,7 +200,11 @@ void OpenGL::cvf_check_ogl(OpenGLContext* oglContext, const CodeLocation& codeLo
|
||||
CVF_ASSERT(oglContext->isCurrent());
|
||||
|
||||
Logger* logger = oglContext->group()->logger();
|
||||
#if defined(CVF_OSX)
|
||||
if (logger && (err != GL_INVALID_FRAMEBUFFER_OPERATION))
|
||||
#else
|
||||
if (logger)
|
||||
#endif /* defined(CVF_OSX) */
|
||||
{
|
||||
String errCodeStr = mapOpenGLErrorToString(err);
|
||||
String msg = "OGL(" + errCodeStr + "): ";
|
||||
|
||||
@@ -286,7 +286,9 @@ bool ShaderProgram::useProgram(OpenGLContext* oglContext) const
|
||||
}
|
||||
|
||||
CVF_ASSERT(OglRc::safeOglId(m_oglRcProgram.p()) != 0);
|
||||
#ifndef CVF_OSX
|
||||
CVF_ASSERT(validateProgram(oglContext));
|
||||
#endif
|
||||
|
||||
// Need this check to clear any "hanging" errors that is not produced by glUseProgram below, but still
|
||||
// will make this method return false.
|
||||
|
||||
Reference in New Issue
Block a user