mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:07:45 +00:00
LibGL+LibSoftGPU: Implement more of GL_LIGHT_MODEL_COLOR_CONTROL
This gets rid of a place where OpenGL was leaking into LibSoftGPU.
This commit is contained in:
parent
4b6b9f272f
commit
284a629ab4
5 changed files with 24 additions and 14 deletions
|
@ -813,7 +813,7 @@ void Device::draw_primitives(PrimitiveType primitive_type, FloatMatrix4x4 const&
|
|||
}
|
||||
|
||||
// FIXME: The spec allows for splitting the colors calculated here into multiple different colors (primary/secondary color). Investigate what this means.
|
||||
(void)m_lighting_model.single_color;
|
||||
(void)m_lighting_model.color_control;
|
||||
|
||||
// FIXME: Two sided lighting should be implemented eventually (I believe this is where the normals are -ve and then lighting is calculated with the BACK material)
|
||||
(void)m_lighting_model.two_sided_lighting;
|
||||
|
|
|
@ -83,7 +83,7 @@ struct RasterizerOptions {
|
|||
struct LightModelParameters {
|
||||
FloatVector4 scene_ambient_color { 0.2f, 0.2f, 0.2f, 1.0f };
|
||||
bool viewer_at_infinity { false };
|
||||
unsigned int single_color { 0x81F9 }; // This is the value of `GL_SINGLE_COLOR`. Considering we definitely don't leak gl.h stuff into here, we fix it to the gl.h macro value.
|
||||
ColorControl color_control { ColorControl::SingleColor };
|
||||
bool two_sided_lighting { false };
|
||||
};
|
||||
|
||||
|
|
|
@ -39,6 +39,11 @@ enum class BlendFactor {
|
|||
SrcAlphaSaturate,
|
||||
};
|
||||
|
||||
enum class ColorControl {
|
||||
SingleColor,
|
||||
SeparateSpecularColor,
|
||||
};
|
||||
|
||||
enum class ColorMaterialFace {
|
||||
Front,
|
||||
Back,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue