mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 15:57:35 +00:00
LibGL+LibGPU+LibSoftGPU: Move Material.h to LibGPU
This commit is contained in:
parent
7da9447619
commit
b652db1f54
5 changed files with 8 additions and 8 deletions
|
@ -1241,7 +1241,7 @@ void Device::set_light_state(unsigned int light_id, GPU::Light const& light)
|
|||
m_lights.at(light_id) = light;
|
||||
}
|
||||
|
||||
void Device::set_material_state(GPU::Face face, Material const& material)
|
||||
void Device::set_material_state(GPU::Face face, GPU::Material const& material)
|
||||
{
|
||||
m_materials[face] = material;
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include <LibGPU/Enums.h>
|
||||
#include <LibGPU/ImageFormat.h>
|
||||
#include <LibGPU/Light.h>
|
||||
#include <LibGPU/Material.h>
|
||||
#include <LibGPU/SamplerConfig.h>
|
||||
#include <LibGfx/Bitmap.h>
|
||||
#include <LibGfx/Matrix3x3.h>
|
||||
|
@ -27,7 +28,6 @@
|
|||
#include <LibSoftGPU/Clipper.h>
|
||||
#include <LibSoftGPU/Config.h>
|
||||
#include <LibSoftGPU/Image.h>
|
||||
#include <LibSoftGPU/Light/Material.h>
|
||||
#include <LibSoftGPU/Sampler.h>
|
||||
#include <LibSoftGPU/Triangle.h>
|
||||
#include <LibSoftGPU/Vertex.h>
|
||||
|
@ -135,7 +135,7 @@ public:
|
|||
|
||||
void set_sampler_config(unsigned, GPU::SamplerConfig const&);
|
||||
void set_light_state(unsigned, GPU::Light const&);
|
||||
void set_material_state(GPU::Face, Material const&);
|
||||
void set_material_state(GPU::Face, GPU::Material const&);
|
||||
void set_stencil_configuration(GPU::Face, StencilConfiguration const&);
|
||||
|
||||
RasterPosition raster_position() const { return m_raster_position; }
|
||||
|
@ -162,7 +162,7 @@ private:
|
|||
Vector<size_t> m_enabled_texture_units;
|
||||
AlphaBlendFactors m_alpha_blend_factors;
|
||||
Array<GPU::Light, NUM_LIGHTS> m_lights;
|
||||
Array<Material, 2u> m_materials;
|
||||
Array<GPU::Material, 2u> m_materials;
|
||||
RasterPosition m_raster_position;
|
||||
Array<StencilConfiguration, 2u> m_stencil_configuration;
|
||||
};
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Jesse Buhagiar <jooster669@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibGfx/Vector4.h>
|
||||
|
||||
namespace SoftGPU {
|
||||
|
||||
struct Material {
|
||||
FloatVector4 ambient { 0.2f, 0.2f, 0.2f, 1.0f };
|
||||
FloatVector4 diffuse { 0.8f, 0.8f, 0.8f, 1.0f };
|
||||
FloatVector4 specular { 0.0f, 0.0f, 0.0f, 1.0f };
|
||||
FloatVector4 emissive { 0.0f, 0.0f, 0.0f, 1.0f };
|
||||
float shininess { 0.0f };
|
||||
float ambient_color_index { 0.0f };
|
||||
float diffuse_color_index { 1.0f };
|
||||
float specular_color_index { 1.0f };
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue