mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-11-03 22:51:06 +01:00 
			
		
		
		
	This commit is contained in:
		@@ -13,6 +13,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
// 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)
 | 
				
			||||||
 | 
					//  2021-04-06: OpenGL: Don't try to read GL_CLIP_ORIGIN unless we're OpenGL 4.5 or greater.
 | 
				
			||||||
//  2021-02-18: OpenGL: Change blending equation to preserve alpha in output buffer.
 | 
					//  2021-02-18: OpenGL: Change blending equation to preserve alpha in output buffer.
 | 
				
			||||||
//  2021-01-03: OpenGL: Backup, setup and restore GL_STENCIL_TEST state.
 | 
					//  2021-01-03: OpenGL: Backup, setup and restore GL_STENCIL_TEST state.
 | 
				
			||||||
//  2020-10-23: OpenGL: Backup, setup and restore GL_PRIMITIVE_RESTART state.
 | 
					//  2020-10-23: OpenGL: Backup, setup and restore GL_PRIMITIVE_RESTART state.
 | 
				
			||||||
@@ -262,11 +263,14 @@ static void ImGui_ImplOpenGL3_SetupRenderState(ImDrawData* draw_data, int fb_wid
 | 
				
			|||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Support for GL 4.5 rarely used glClipControl(GL_UPPER_LEFT)
 | 
					    // Support for GL 4.5 rarely used glClipControl(GL_UPPER_LEFT)
 | 
				
			||||||
#if defined(GL_CLIP_ORIGIN) && !defined(__APPLE__)
 | 
					#if defined(GL_CLIP_ORIGIN)
 | 
				
			||||||
    bool clip_origin_lower_left = true;
 | 
					    bool clip_origin_lower_left = true;
 | 
				
			||||||
    GLenum current_clip_origin = 0; glGetIntegerv(GL_CLIP_ORIGIN, (GLint*)¤t_clip_origin);
 | 
					    if (g_GlVersion >= 450)
 | 
				
			||||||
    if (current_clip_origin == GL_UPPER_LEFT)
 | 
					    {
 | 
				
			||||||
        clip_origin_lower_left = false;
 | 
					        GLenum current_clip_origin = 0; glGetIntegerv(GL_CLIP_ORIGIN, (GLint*)¤t_clip_origin);
 | 
				
			||||||
 | 
					        if (current_clip_origin == GL_UPPER_LEFT)
 | 
				
			||||||
 | 
					            clip_origin_lower_left = false;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Setup viewport, orthographic projection matrix
 | 
					    // Setup viewport, orthographic projection matrix
 | 
				
			||||||
@@ -276,7 +280,7 @@ static void ImGui_ImplOpenGL3_SetupRenderState(ImDrawData* draw_data, int fb_wid
 | 
				
			|||||||
    float R = draw_data->DisplayPos.x + draw_data->DisplaySize.x;
 | 
					    float R = draw_data->DisplayPos.x + draw_data->DisplaySize.x;
 | 
				
			||||||
    float T = draw_data->DisplayPos.y;
 | 
					    float T = draw_data->DisplayPos.y;
 | 
				
			||||||
    float B = draw_data->DisplayPos.y + draw_data->DisplaySize.y;
 | 
					    float B = draw_data->DisplayPos.y + draw_data->DisplaySize.y;
 | 
				
			||||||
#if defined(GL_CLIP_ORIGIN) && !defined(__APPLE__)
 | 
					#if defined(GL_CLIP_ORIGIN)
 | 
				
			||||||
    if (!clip_origin_lower_left) { float tmp = T; T = B; B = tmp; } // Swap top and bottom if origin is upper left
 | 
					    if (!clip_origin_lower_left) { float tmp = T; T = B; B = tmp; } // Swap top and bottom if origin is upper left
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
    const float ortho_projection[4][4] =
 | 
					    const float ortho_projection[4][4] =
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -59,6 +59,7 @@ Other Changes:
 | 
				
			|||||||
  workaround/fix state restoring issues. Unknown exactly why so, but bit of a cargo-cult fix. (#3857)
 | 
					  workaround/fix state restoring issues. Unknown exactly why so, but bit of a cargo-cult fix. (#3857)
 | 
				
			||||||
- Backends: Vulkan: Fix mapped memory Vulkan validation error when buffer sizes are not multiple of
 | 
					- Backends: Vulkan: Fix mapped memory Vulkan validation error when buffer sizes are not multiple of
 | 
				
			||||||
  VkPhysicalDeviceLimits::nonCoherentAtomSize. (#3957) [@AgentX1994]
 | 
					  VkPhysicalDeviceLimits::nonCoherentAtomSize. (#3957) [@AgentX1994]
 | 
				
			||||||
 | 
					- Backends: OpenGL3: Don't try to read GL_CLIP_ORIGIN unless we're OpenGL 4.5. (#3998, #2366, #2186) [@s7jones]
 | 
				
			||||||
- Examples: Add OpenGL ES 2.0 support to modern GL examples. (#2837, #3951) [@lethal-guitar, @hinxx]
 | 
					- Examples: Add OpenGL ES 2.0 support to modern GL examples. (#2837, #3951) [@lethal-guitar, @hinxx]
 | 
				
			||||||
- Examples: Vulkan: Rebuild swapchain on VK_SUBOPTIMAL_KHR. (#3881)
 | 
					- Examples: Vulkan: Rebuild swapchain on VK_SUBOPTIMAL_KHR. (#3881)
 | 
				
			||||||
- Examples: SDL2: Link with shell32.lib required by SDL2main.lib since SDL 2.0.12. [#3988]
 | 
					- Examples: SDL2: Link with shell32.lib required by SDL2main.lib since SDL 2.0.12. [#3988]
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user