1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-19 13:40:49 +03:00

0029125: Visualization, OpenGl_Text - fix access violation within OpenGL1.1 context

OpenGl_Context::DiagnosticInformation() - added OpenGL version check before retrieving GL_SHADING_LANGUAGE_VERSION string.
This commit is contained in:
kgv
2017-09-19 12:53:15 +03:00
committed by bugmaster
parent 8444aedb1d
commit 048e1b3b03
2 changed files with 13 additions and 2 deletions

View File

@@ -2816,7 +2816,10 @@ void OpenGl_Context::DiagnosticInformation (TColStd_IndexedDataMapOfStringString
addInfo (theDict, "GLvendor", (const char*)::glGetString (GL_VENDOR));
addInfo (theDict, "GLdevice", (const char*)::glGetString (GL_RENDERER));
addInfo (theDict, "GLversion", (const char*)::glGetString (GL_VERSION));
addInfo (theDict, "GLSLversion", (const char*)::glGetString (GL_SHADING_LANGUAGE_VERSION));
if (IsGlGreaterEqual (2, 0))
{
addInfo (theDict, "GLSLversion", (const char*)::glGetString (GL_SHADING_LANGUAGE_VERSION));
}
if (myIsGlDebugCtx)
{
addInfo (theDict, "GLdebug", "ON");