1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 10:47:35 +00:00

LibSoftGPU: Remove OpenGL type for alpha blend factors

Replaces the GLenum used for configuring alpha blend factors in the
SoftGPU device with out own enum.
This commit is contained in:
Stephan Unverwerth 2021-12-22 23:11:35 +01:00 committed by Brian Gianforcaro
parent 40bd73bdef
commit c720cd00db
3 changed files with 60 additions and 16 deletions

View file

@ -37,6 +37,20 @@ enum class AlphaTestFunction {
Greater,
};
enum class BlendFactor {
Zero,
One,
SrcAlpha,
OneMinusSrcAlpha,
SrcColor,
OneMinusSrcColor,
DstAlpha,
OneMinusDstAlpha,
DstColor,
OneMinusDstColor,
SrcAlphaSaturate,
};
struct RasterizerOptions {
bool shade_smooth { true };
bool enable_depth_test { false };
@ -45,8 +59,8 @@ struct RasterizerOptions {
AlphaTestFunction alpha_test_func { AlphaTestFunction::Always };
float alpha_test_ref_value { 0 };
bool enable_blending { false };
GLenum blend_source_factor { GL_ONE };
GLenum blend_destination_factor { GL_ONE };
BlendFactor blend_source_factor { BlendFactor::One };
BlendFactor blend_destination_factor { BlendFactor::One };
u32 color_mask { 0xffffffff };
float depth_min { 0 };
float depth_max { 1 };