mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 11:57:35 +00:00
LibSoftGPU: Move enums into separate file
This commit is contained in:
parent
f7c40b25ac
commit
1a758d7bf2
2 changed files with 72 additions and 60 deletions
|
@ -15,6 +15,7 @@
|
||||||
#include <LibGfx/Vector4.h>
|
#include <LibGfx/Vector4.h>
|
||||||
#include <LibSoftGPU/Clipper.h>
|
#include <LibSoftGPU/Clipper.h>
|
||||||
#include <LibSoftGPU/DepthBuffer.h>
|
#include <LibSoftGPU/DepthBuffer.h>
|
||||||
|
#include <LibSoftGPU/Enums.h>
|
||||||
#include <LibSoftGPU/Image.h>
|
#include <LibSoftGPU/Image.h>
|
||||||
#include <LibSoftGPU/ImageFormat.h>
|
#include <LibSoftGPU/ImageFormat.h>
|
||||||
#include <LibSoftGPU/Sampler.h>
|
#include <LibSoftGPU/Sampler.h>
|
||||||
|
@ -23,66 +24,6 @@
|
||||||
|
|
||||||
namespace SoftGPU {
|
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 {
|
struct RasterizerOptions {
|
||||||
bool shade_smooth { true };
|
bool shade_smooth { true };
|
||||||
bool enable_depth_test { false };
|
bool enable_depth_test { false };
|
||||||
|
|
71
Userland/Libraries/LibSoftGPU/Enums.h
Normal file
71
Userland/Libraries/LibSoftGPU/Enums.h
Normal file
|
@ -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,
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue