summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGL/SoftwareGLContext.h
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibGL/SoftwareGLContext.h')
-rw-r--r--Userland/Libraries/LibGL/SoftwareGLContext.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGL/SoftwareGLContext.h b/Userland/Libraries/LibGL/SoftwareGLContext.h
index c245cff5b4..38eef4573c 100644
--- a/Userland/Libraries/LibGL/SoftwareGLContext.h
+++ b/Userland/Libraries/LibGL/SoftwareGLContext.h
@@ -8,7 +8,10 @@
#include "GLContext.h"
#include "GLStruct.h"
+#include "SoftwareRasterizer.h"
+#include <AK/RefPtr.h>
#include <AK/Vector.h>
+#include <LibGfx/Bitmap.h>
#include <LibGfx/Matrix4x4.h>
#include <LibGfx/Vector3.h>
@@ -16,6 +19,8 @@ namespace GL {
class SoftwareGLContext : public GLContext {
public:
+ SoftwareGLContext(Gfx::Bitmap&);
+
virtual void gl_begin(GLenum mode) override;
virtual void gl_clear(GLbitfield mask) override;
virtual void gl_clear_color(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) override;
@@ -40,6 +45,8 @@ public:
virtual void gl_front_face(GLenum) override;
virtual void gl_cull_face(GLenum) override;
+ virtual void present() override;
+
private:
GLenum m_current_draw_mode;
GLenum m_current_matrix_mode;
@@ -64,6 +71,10 @@ private:
bool m_cull_faces = false;
GLenum m_front_face = GL_CCW;
GLenum m_culled_sides = GL_BACK;
+
+ NonnullRefPtr<Gfx::Bitmap> m_frontbuffer;
+
+ SoftwareRasterizer m_rasterizer;
};
}