mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 22:07:35 +00:00
LibGL+LibSoftGPU: Implement glColorMaterial
and GL_COLOR_MATERIAL
When `GL_COLOR_MATERIAL` is enabled, specific material parameters can be overwritten by the current color per-vertex during the lighting calculations. Which parameter is controlled by `glColorMaterial`. Also move the lighting calculations _before_ clipping, because the spec says so. As a result, we interpolate the resulting vertex color instead of the input color.
This commit is contained in:
parent
9d4c2f6308
commit
8e935ad3b1
8 changed files with 158 additions and 35 deletions
|
@ -33,6 +33,20 @@ enum class BlendFactor {
|
|||
SrcAlphaSaturate,
|
||||
};
|
||||
|
||||
enum class ColorMaterialFace {
|
||||
Front,
|
||||
Back,
|
||||
FrontAndBack,
|
||||
};
|
||||
|
||||
enum class ColorMaterialMode {
|
||||
Ambient,
|
||||
AmbientAndDiffuse,
|
||||
Diffuse,
|
||||
Emissive,
|
||||
Specular,
|
||||
};
|
||||
|
||||
enum class DepthTestFunction {
|
||||
Never,
|
||||
Always,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue