mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-11-03 22:51:06 +01:00 
			
		
		
		
	Examples: OpenGL2: Disabling/restoring GL_LIGHTING and GL_COLOR_MATERIAL to increase compatibility with legacy OpenGL applications. (#1996)
This commit is contained in:
		@@ -18,6 +18,7 @@
 | 
			
		||||
 | 
			
		||||
// CHANGELOG 
 | 
			
		||||
// (minor and older changes stripped away, please see git history for details)
 | 
			
		||||
//  2018-08-03: OpenGL: Disabling/restoring GL_LIGHTING and GL_COLOR_MATERIAL to increase compatibility with legacy OpenGL applications.
 | 
			
		||||
//  2018-06-08: Misc: Extracted imgui_impl_opengl2.cpp/.h away from the old combined GLFW/SDL+OpenGL2 examples.
 | 
			
		||||
//  2018-06-08: OpenGL: Use draw_data->DisplayPos and draw_data->DisplaySize to setup projection matrix and clipping rectangle.
 | 
			
		||||
//  2018-02-16: Misc: Obsoleted the io.RenderDrawListsFn callback and exposed ImGui_ImplGlfwGL2_RenderDrawData() in the .h file so you can call it yourself.
 | 
			
		||||
@@ -90,6 +91,8 @@ void ImGui_ImplOpenGL2_RenderDrawData(ImDrawData* draw_data)
 | 
			
		||||
    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
 | 
			
		||||
    glDisable(GL_CULL_FACE);
 | 
			
		||||
    glDisable(GL_DEPTH_TEST);
 | 
			
		||||
    glDisable(GL_LIGHTING);
 | 
			
		||||
    glDisable(GL_COLOR_MATERIAL);
 | 
			
		||||
    glEnable(GL_SCISSOR_TEST);
 | 
			
		||||
    glEnableClientState(GL_VERTEX_ARRAY);
 | 
			
		||||
    glEnableClientState(GL_TEXTURE_COORD_ARRAY);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user