@ -11,10 +11,11 @@
// CHANGELOG
// CHANGELOG
// (minor and older changes stripped away, please see git history for details)
// (minor and older changes stripped away, please see git history for details)
// 2019-02-20: OpenGL: Fix for OSX not supporting OpenGL 4.5, we don't try to read GL_CLIP_ORIGIN even if defined by the headers/loader.
// 2019-02-11: OpenGL: Projecting clipping rectangles correctly using draw_data->FramebufferScale to allow multi-viewports for retina display.
// 2019-02-11: OpenGL: Projecting clipping rectangles correctly using draw_data->FramebufferScale to allow multi-viewports for retina display.
// 2019-02-01: OpenGL: Using GLSL 410 shaders for any version over 410 (e.g. 430, 450).
// 2019-02-01: OpenGL: Using GLSL 410 shaders for any version over 410 (e.g. 430, 450).
// 2018-11-30: Misc: Setting up io.BackendRendererName so it can be displayed in the About Window.
// 2018-11-30: Misc: Setting up io.BackendRendererName so it can be displayed in the About Window.
// 2018-11-13: OpenGL: Support for GL 4.5's glClipControl(GL_UPPER_LEFT) .
// 2018-11-13: OpenGL: Support for GL 4.5's glClipControl(GL_UPPER_LEFT) / GL_CLIP_ORIGIN .
// 2018-08-29: OpenGL: Added support for more OpenGL loaders: glew and glad, with comments indicative that any loader can be used.
// 2018-08-29: OpenGL: Added support for more OpenGL loaders: glew and glad, with comments indicative that any loader can be used.
// 2018-08-09: OpenGL: Default to OpenGL ES 3 on iOS and Android. GLSL version default to "#version 300 ES".
// 2018-08-09: OpenGL: Default to OpenGL ES 3 on iOS and Android. GLSL version default to "#version 300 ES".
// 2018-07-30: OpenGL: Support for GLSL 300 ES and 410 core. Fixes for Emscripten compilation.
// 2018-07-30: OpenGL: Support for GLSL 300 ES and 410 core. Fixes for Emscripten compilation.
@ -169,7 +170,7 @@ void ImGui_ImplOpenGL3_RenderDrawData(ImDrawData* draw_data)
GLboolean last_enable_depth_test = glIsEnabled ( GL_DEPTH_TEST ) ;
GLboolean last_enable_depth_test = glIsEnabled ( GL_DEPTH_TEST ) ;
GLboolean last_enable_scissor_test = glIsEnabled ( GL_SCISSOR_TEST ) ;
GLboolean last_enable_scissor_test = glIsEnabled ( GL_SCISSOR_TEST ) ;
bool clip_origin_lower_left = true ;
bool clip_origin_lower_left = true ;
# if def GL_CLIP_ORIGIN
# if defined(GL_CLIP_ORIGIN) && !defined(__APPLE__)
GLenum last_clip_origin = 0 ; glGetIntegerv ( GL_CLIP_ORIGIN , ( GLint * ) & last_clip_origin ) ; // Support for GL 4.5's glClipControl(GL_UPPER_LEFT)
GLenum last_clip_origin = 0 ; glGetIntegerv ( GL_CLIP_ORIGIN , ( GLint * ) & last_clip_origin ) ; // Support for GL 4.5's glClipControl(GL_UPPER_LEFT)
if ( last_clip_origin = = GL_UPPER_LEFT )
if ( last_clip_origin = = GL_UPPER_LEFT )
clip_origin_lower_left = false ;
clip_origin_lower_left = false ;