diff options
author | Stephan Unverwerth <s.unverwerth@serenityos.org> | 2021-12-23 02:07:11 +0100 |
---|---|---|
committer | Brian Gianforcaro <b.gianfo@gmail.com> | 2021-12-24 05:10:28 -0800 |
commit | 1a758d7bf23b32da2ab3e442e2dd58a5b7731f55 (patch) | |
tree | cc435adbf0a7e4a827a46ddd463b2e9b68b1bea1 | |
parent | f7c40b25acd3bcb2ee53dfde8d2f49f355bed8b4 (diff) | |
download | serenity-1a758d7bf23b32da2ab3e442e2dd58a5b7731f55.zip |
LibSoftGPU: Move enums into separate file
-rw-r--r-- | Userland/Libraries/LibSoftGPU/Device.h | 61 | ||||
-rw-r--r-- | Userland/Libraries/LibSoftGPU/Enums.h | 71 |
2 files changed, 72 insertions, 60 deletions
diff --git a/Userland/Libraries/LibSoftGPU/Device.h b/Userland/Libraries/LibSoftGPU/Device.h index e2e03fd25b..498cea1aee 100644 --- a/Userland/Libraries/LibSoftGPU/Device.h +++ b/Userland/Libraries/LibSoftGPU/Device.h @@ -15,6 +15,7 @@ #include <LibGfx/Vector4.h> #include <LibSoftGPU/Clipper.h> #include <LibSoftGPU/DepthBuffer.h> +#include <LibSoftGPU/Enums.h> #include <LibSoftGPU/Image.h> #include <LibSoftGPU/ImageFormat.h> #include <LibSoftGPU/Sampler.h> @@ -23,66 +24,6 @@ namespace SoftGPU { -enum class AlphaTestFunction { - Never, - Always, - Less, - LessOrEqual, - Equal, - NotEqual, - GreaterOrEqual, - Greater, -}; - -enum class BlendFactor { - Zero, - One, - SrcAlpha, - OneMinusSrcAlpha, - SrcColor, - OneMinusSrcColor, - DstAlpha, - OneMinusDstAlpha, - DstColor, - OneMinusDstColor, - SrcAlphaSaturate, -}; - -enum class DepthTestFunction { - Never, - Always, - Less, - LessOrEqual, - Equal, - NotEqual, - GreaterOrEqual, - Greater, -}; - -enum FogMode { - Linear, - Exp, - Exp2 -}; - -enum class PolygonMode { - Point, - Line, - Fill, -}; - -enum class WindingOrder { - Clockwise, - CounterClockwise, -}; - -enum class PrimitiveType { - Triangles, - TriangleStrip, - TriangleFan, - Quads, -}; - struct RasterizerOptions { bool shade_smooth { true }; bool enable_depth_test { false }; diff --git a/Userland/Libraries/LibSoftGPU/Enums.h b/Userland/Libraries/LibSoftGPU/Enums.h new file mode 100644 index 0000000000..e349ced509 --- /dev/null +++ b/Userland/Libraries/LibSoftGPU/Enums.h @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2021, Stephan Unverwerth <s.unverwerth@serenityos.org> + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#pragma once + +namespace SoftGPU { + +enum class AlphaTestFunction { + Never, + Always, + Less, + LessOrEqual, + Equal, + NotEqual, + GreaterOrEqual, + Greater, +}; + +enum class BlendFactor { + Zero, + One, + SrcAlpha, + OneMinusSrcAlpha, + SrcColor, + OneMinusSrcColor, + DstAlpha, + OneMinusDstAlpha, + DstColor, + OneMinusDstColor, + SrcAlphaSaturate, +}; + +enum class DepthTestFunction { + Never, + Always, + Less, + LessOrEqual, + Equal, + NotEqual, + GreaterOrEqual, + Greater, +}; + +enum FogMode { + Linear, + Exp, + Exp2 +}; + +enum class PolygonMode { + Point, + Line, + Fill, +}; + +enum class WindingOrder { + Clockwise, + CounterClockwise, +}; + +enum class PrimitiveType { + Triangles, + TriangleStrip, + TriangleFan, + Quads, +}; + +} |