1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 20:17:44 +00:00

LibSoftGPU: Remove OpenGL type for depth test func

Replaces the GLenum used in the RasterizerConfig for selecting the depth
test function with out own enum.
This commit is contained in:
Stephan Unverwerth 2021-12-22 23:38:13 +01:00 committed by Brian Gianforcaro
parent 33e601800c
commit 74ed7713fa
3 changed files with 50 additions and 10 deletions

View file

@ -51,6 +51,17 @@ enum class BlendFactor {
SrcAlphaSaturate,
};
enum class DepthTestFunction {
Never,
Always,
Less,
LessOrEqual,
Equal,
NotEqual,
GreaterOrEqual,
Greater,
};
enum class WindingOrder {
Clockwise,
CounterClockwise,
@ -69,7 +80,7 @@ struct RasterizerOptions {
u32 color_mask { 0xffffffff };
float depth_min { 0 };
float depth_max { 1 };
GLenum depth_func { GL_LESS };
DepthTestFunction depth_func { DepthTestFunction::Less };
GLenum polygon_mode { GL_FILL };
FloatVector4 fog_color { 0.0f, 0.0f, 0.0f, 0.0f };
float fog_density { 1.0f };