mirror of
				https://github.com/ocornut/imgui.git
				synced 2025-11-04 01:34:32 +00:00 
			
		
		
		
	Examples: Reworked setup of clear color to be compatible with transparent values. (#2693, #2764, #2766, #2873, #3447, #3813, #3816)
This commit is contained in:
		@@ -137,7 +137,7 @@ int main(int, char**)
 | 
			
		||||
        // Rendering
 | 
			
		||||
        ImGui::Render();
 | 
			
		||||
        glViewport(0, 0, (int)io.DisplaySize.x, (int)io.DisplaySize.y);
 | 
			
		||||
        glClearColor(clear_color.x, clear_color.y, clear_color.z, clear_color.w);
 | 
			
		||||
        glClearColor(clear_color.x * clear_color.w, clear_color.y * clear_color.w, clear_color.z * clear_color.w, clear_color.w);
 | 
			
		||||
        glClear(GL_COLOR_BUFFER_BIT);
 | 
			
		||||
        //glUseProgram(0); // You may want this if using this code in an OpenGL 3+ context where shaders may be bound
 | 
			
		||||
        ImGui_ImplOpenGL2_RenderDrawData(ImGui::GetDrawData());
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user