diff options
author | Stephan Unverwerth <s.unverwerth@serenityos.org> | 2022-03-27 15:24:10 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-04-06 11:32:24 +0200 |
commit | 8f359bf758c277cb81c9907428d7e7aa1ac0d8ef (patch) | |
tree | 34329a5c2cbe97f586a02b7028ace1bb4e138373 /Userland/Libraries/LibSoftGPU | |
parent | e416380826a680ca4f1de630f5407b1e997943bc (diff) | |
download | serenity-8f359bf758c277cb81c9907428d7e7aa1ac0d8ef.zip |
LibGPU+LibSoftGPU: Move RasterPosition into its own header in LibGPU
Diffstat (limited to 'Userland/Libraries/LibSoftGPU')
-rw-r--r-- | Userland/Libraries/LibSoftGPU/Device.cpp | 2 | ||||
-rw-r--r-- | Userland/Libraries/LibSoftGPU/Device.h | 16 |
2 files changed, 5 insertions, 13 deletions
diff --git a/Userland/Libraries/LibSoftGPU/Device.cpp b/Userland/Libraries/LibSoftGPU/Device.cpp index 8b68e74c80..e6a9b23d63 100644 --- a/Userland/Libraries/LibSoftGPU/Device.cpp +++ b/Userland/Libraries/LibSoftGPU/Device.cpp @@ -1251,7 +1251,7 @@ void Device::set_stencil_configuration(GPU::Face face, GPU::StencilConfiguration m_stencil_configuration[face] = stencil_configuration; } -void Device::set_raster_position(RasterPosition const& raster_position) +void Device::set_raster_position(GPU::RasterPosition const& raster_position) { m_raster_position = raster_position; } diff --git a/Userland/Libraries/LibSoftGPU/Device.h b/Userland/Libraries/LibSoftGPU/Device.h index f0e0bf0e1a..979681f83e 100644 --- a/Userland/Libraries/LibSoftGPU/Device.h +++ b/Userland/Libraries/LibSoftGPU/Device.h @@ -16,6 +16,7 @@ #include <LibGPU/ImageFormat.h> #include <LibGPU/Light.h> #include <LibGPU/Material.h> +#include <LibGPU/RasterPosition.h> #include <LibGPU/SamplerConfig.h> #include <LibGPU/StencilConfiguration.h> #include <LibGfx/Bitmap.h> @@ -91,15 +92,6 @@ struct LightModelParameters { struct PixelQuad; -struct RasterPosition { - FloatVector4 window_coordinates { 0.0f, 0.0f, 0.0f, 1.0f }; - float eye_coordinate_distance { 0.0f }; - bool valid { true }; - FloatVector4 color_rgba { 1.0f, 1.0f, 1.0f, 1.0f }; - float color_index { 1.0f }; - FloatVector4 texture_coordinates { 0.0f, 0.0f, 0.0f, 1.0f }; -}; - class Device final { public: Device(Gfx::IntSize const& min_size); @@ -128,8 +120,8 @@ public: void set_material_state(GPU::Face, GPU::Material const&); void set_stencil_configuration(GPU::Face, GPU::StencilConfiguration const&); - RasterPosition raster_position() const { return m_raster_position; } - void set_raster_position(RasterPosition const& raster_position); + GPU::RasterPosition raster_position() const { return m_raster_position; } + void set_raster_position(GPU::RasterPosition const& raster_position); void set_raster_position(FloatVector4 const& position, FloatMatrix4x4 const& model_view_transform, FloatMatrix4x4 const& projection_transform); private: @@ -153,7 +145,7 @@ private: AlphaBlendFactors m_alpha_blend_factors; Array<GPU::Light, NUM_LIGHTS> m_lights; Array<GPU::Material, 2u> m_materials; - RasterPosition m_raster_position; + GPU::RasterPosition m_raster_position; Array<GPU::StencilConfiguration, 2u> m_stencil_configuration; }; |