Browse Source

Backend: OpenGL3: Amend b0c18166 fix cases where glGetString(GL_VERSION) returns NULL. (#6154, #4445, #3530)

pull/6247/head
ocornut 2 years ago
parent
commit
0d606968d8
  1. 1
      backends/imgui_impl_opengl3.cpp
  2. 2
      backends/imgui_impl_opengl3_loader.h
  3. 1
      docs/CHANGELOG.txt

1
backends/imgui_impl_opengl3.cpp

@ -14,6 +14,7 @@
// CHANGELOG
// (minor and older changes stripped away, please see git history for details)
// 2023-03-15: OpenGL: Fixed GL loader crash when GL_VERSION returns NULL. (#6154, #4445, #3530)
// 2023-03-06: OpenGL: Fixed restoration of a potentially deleted OpenGL program, by calling glIsProgram(). (#6220, #6224)
// 2022-11-09: OpenGL: Reverted use of glBufferSubData(), too many corruptions issues + old issues seemingly can't be reproed with Intel drivers nowadays (revert 2021-12-15 and 2022-05-23 changes).
// 2022-10-11: Using 'nullptr' instead of 'NULL' as per our switch to C++11.

2
backends/imgui_impl_opengl3_loader.h

@ -692,7 +692,7 @@ static int parse_version(void)
if (version.major == 0 && version.minor == 0)
{
// Query GL_VERSION in desktop GL 2.x, the string will start with "<major>.<minor>"
const char* gl_version = (const char*)glGetString(GL_VERSION);
if (const char* gl_version = (const char*)glGetString(GL_VERSION))
sscanf(gl_version, "%d.%d", &version.major, &version.minor);
}
if (version.major < 2)

1
docs/CHANGELOG.txt

@ -39,6 +39,7 @@ Breaking Changes:
Other changes:
- Backends: OpenGL3: Fixed GL loader crash when GL_VERSION returns NULL. (#6154, #4445, #3530)
-----------------------------------------------------------------------

Loading…
Cancel
Save