From: kgv Date: Sun, 20 Oct 2019 11:13:46 +0000 (+0300) Subject: 0031088: Visualization - GL_INVALID_ENUM while dumping view within OpenGL 1.1 X-Git-Tag: V7_5_0_beta~369 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=97e0059b05fe5b476a6a0e353eacf286c58e9dab;p=occt-copy.git 0031088: Visualization - GL_INVALID_ENUM while dumping view within OpenGL 1.1 OpenGl_Sampler::resetGlobalTextureParams() - added missing version check before disabling GL_POINT_SPRITE. --- diff --git a/src/OpenGl/OpenGl_Sampler.cxx b/src/OpenGl/OpenGl_Sampler.cxx index 24b69b65fa..54c1e25f07 100644 --- a/src/OpenGl/OpenGl_Sampler.cxx +++ b/src/OpenGl/OpenGl_Sampler.cxx @@ -418,7 +418,8 @@ void OpenGl_Sampler::resetGlobalTextureParams (const Handle(OpenGl_Context)& the { theCtx->core11fwd->glDisable (GL_TEXTURE_GEN_S); theCtx->core11fwd->glDisable (GL_TEXTURE_GEN_T); - if (theParams->GenMode() == Graphic3d_TOTM_SPRITE) + if (theParams->GenMode() == Graphic3d_TOTM_SPRITE + && theCtx->core20fwd != NULL) { theCtx->core11fwd->glDisable (GL_POINT_SPRITE); }