chore: move depth test setting to gfx init
This commit is contained in:
		
							parent
							
								
									1f217971fd
								
							
						
					
					
						commit
						cf5418780b
					
				@ -86,6 +86,8 @@ int initGraphics(GLFWwindow** window)
 | 
				
			|||||||
        return -1;
 | 
					        return -1;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    glEnable(GL_DEPTH_TEST);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return 0;
 | 
					    return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -155,8 +157,6 @@ int main()
 | 
				
			|||||||
    Icosphere sphere(0.5, 2);
 | 
					    Icosphere sphere(0.5, 2);
 | 
				
			||||||
    Orbit orbit(30, glm::vec3(.5, .5, 0));
 | 
					    Orbit orbit(30, glm::vec3(.5, .5, 0));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    glEnable(GL_DEPTH_TEST);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    // Main loop
 | 
					    // Main loop
 | 
				
			||||||
    while (!glfwWindowShouldClose(window))
 | 
					    while (!glfwWindowShouldClose(window))
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user