mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 15:42:44 +00:00 
			
		
		
		
	 0836912a6d
			
		
	
	
		0836912a6d
		
	
	
	
	
		
			
			This commit implements glClipPlane and its supporting calls, backed by new support for user-defined clip planes in the software GPU clipper. This fixes some visual bugs seen in the Quake III port, in which mirrors would only reflect correctly from close distances.
		
			
				
	
	
		
			29 lines
		
	
	
	
		
			861 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
	
		
			861 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2021, Stephan Unverwerth <s.unverwerth@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <LibGPU/Config.h>
 | |
| 
 | |
| #define INCREASE_STATISTICS_COUNTER(stat, n)     \
 | |
|     do {                                         \
 | |
|         if constexpr (ENABLE_STATISTICS_OVERLAY) \
 | |
|             stat += (n);                         \
 | |
|     } while (0)
 | |
| 
 | |
| namespace SoftGPU {
 | |
| 
 | |
| static constexpr bool ENABLE_STATISTICS_OVERLAY = false;
 | |
| static constexpr int MILLISECONDS_PER_STATISTICS_PERIOD = 500;
 | |
| static constexpr int NUM_LIGHTS = 8;
 | |
| static constexpr int MAX_CLIP_PLANES = 6;
 | |
| static constexpr int SUBPIXEL_BITS = 6;
 | |
| 
 | |
| // See: https://www.khronos.org/opengl/wiki/Common_Mistakes#Texture_edge_color_problem
 | |
| // FIXME: make this dynamically configurable through ConfigServer
 | |
| static constexpr bool CLAMP_DEPRECATED_BEHAVIOR = false;
 | |
| 
 | |
| }
 |