1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:48:10 +00:00
serenity/Userland/Libraries/LibSoftGPU/Light/Material.h
Jesse Buhagiar 92373ab0b6 LibGL: Flesh out glMaterialf{v}
These two functions have been turned from stubs into actually doing
something. They now set the correspondingmaterial data member based on
the value passed into the `pname`argument.

Co-authored-by: Stephan Unverwerth <s.unverwerth@serenityos.org>
2022-01-12 13:36:56 +01:00

25 lines
616 B
C++

/*
* Copyright (c) 2022, Jesse Buhagiar <jooster669@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibGfx/Vector4.h>
namespace SoftGPU {
struct Material {
Vector4<float> ambient { 0.2f, 0.2f, 0.2f, 1.0f };
Vector4<float> diffuse { 0.8f, 0.8f, 0.8f, 1.0f };
Vector4<float> specular { 0.0f, 0.0f, 0.0f, 1.0f };
Vector4<float> emissive { 0.0f, 0.0f, 0.0f, 1.0f };
float shininess { 0.0f };
float specular_exponent { 0.0f };
float ambient_color_index { 0.0f };
float diffuse_color_index = { 1.0f };
float specular_color_index = { 1.0f };
};
}