summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibSoftGPU/Device.h
diff options
context:
space:
mode:
authorStephan Unverwerth <s.unverwerth@serenityos.org>2021-12-22 23:58:36 +0100
committerBrian Gianforcaro <b.gianfo@gmail.com>2021-12-24 05:10:28 -0800
commitf7c40b25acd3bcb2ee53dfde8d2f49f355bed8b4 (patch)
tree117d297e890c62693f6605b377ccf9165f9fa8a7 /Userland/Libraries/LibSoftGPU/Device.h
parentde0069188f700e3e5487e7e02adb7876ba3dd178 (diff)
downloadserenity-f7c40b25acd3bcb2ee53dfde8d2f49f355bed8b4.zip
LibSoftGPU: Remove GLenum used for selecting rendered primitive type
This removes the last reference to LibGL from LibSoftGPU. The GLenum has been replaced by our own enum.
Diffstat (limited to 'Userland/Libraries/LibSoftGPU/Device.h')
-rw-r--r--Userland/Libraries/LibSoftGPU/Device.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/Userland/Libraries/LibSoftGPU/Device.h b/Userland/Libraries/LibSoftGPU/Device.h
index d5483a9be7..e2e03fd25b 100644
--- a/Userland/Libraries/LibSoftGPU/Device.h
+++ b/Userland/Libraries/LibSoftGPU/Device.h
@@ -9,9 +9,6 @@
#include <AK/Array.h>
#include <AK/NonnullRefPtr.h>
#include <AK/OwnPtr.h>
-#include <LibGL/GL/gl.h>
-#include <LibGL/Tex/Texture2D.h>
-#include <LibGL/Tex/TextureUnit.h>
#include <LibGfx/Bitmap.h>
#include <LibGfx/Matrix4x4.h>
#include <LibGfx/Rect.h>
@@ -79,6 +76,13 @@ enum class WindingOrder {
CounterClockwise,
};
+enum class PrimitiveType {
+ Triangles,
+ TriangleStrip,
+ TriangleFan,
+ Quads,
+};
+
struct RasterizerOptions {
bool shade_smooth { true };
bool enable_depth_test { false };
@@ -117,7 +121,7 @@ class Device final {
public:
Device(const Gfx::IntSize& min_size);
- void draw_primitives(GLenum primitive_type, FloatMatrix4x4 const& transform, FloatMatrix4x4 const& texture_matrix, Vector<Vertex> const& vertices, Vector<size_t> const& enabled_texture_units);
+ void draw_primitives(PrimitiveType, FloatMatrix4x4 const& transform, FloatMatrix4x4 const& texture_matrix, Vector<Vertex> const& vertices, Vector<size_t> const& enabled_texture_units);
void resize(const Gfx::IntSize& min_size);
void clear_color(const FloatVector4&);
void clear_depth(float);