Better like this: glClear is in the framebuffer callback.
This commit is contained in:
		
					parent
					
						
							
								58af31be5e
							
						
					
				
			
			
				commit
				
					
						109ae75fb2
					
				
			
		
					 2 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -108,7 +108,6 @@ void gui::Gui::render_gui(const Controller &controller) {
 | 
			
		|||
 | 
			
		||||
void gui::Gui::render_gpu() const {
 | 
			
		||||
	if (initialized) {
 | 
			
		||||
		glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
 | 
			
		||||
		ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -8,6 +8,7 @@ static void glfwErrorCallback(int error, const char *message) {
 | 
			
		|||
 | 
			
		||||
static void framebufferCallback([[maybe_unused]] GLFWwindow *glfWwindow, int width, int height) {
 | 
			
		||||
	glViewport(0, 0, width, height);
 | 
			
		||||
	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
gui::Window::Window() {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue