summaryrefslogtreecommitdiff
path: root/src/video_core/hwrasterizer_base.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core/hwrasterizer_base.h')
-rw-r--r--src/video_core/hwrasterizer_base.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/video_core/hwrasterizer_base.h b/src/video_core/hwrasterizer_base.h
new file mode 100644
index 000000000..dec193f8b
--- /dev/null
+++ b/src/video_core/hwrasterizer_base.h
@@ -0,0 +1,40 @@
1// Copyright 2015 Citra Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include "common/emu_window.h"
8#include "video_core/vertex_shader.h"
9
10class HWRasterizer {
11public:
12 virtual ~HWRasterizer() {
13 }
14
15 /// Initialize API-specific GPU objects
16 virtual void InitObjects() = 0;
17
18 /// Reset the rasterizer, such as flushing all caches and updating all state
19 virtual void Reset() = 0;
20
21 /// Queues the primitive formed by the given vertices for rendering
22 virtual void AddTriangle(const Pica::VertexShader::OutputVertex& v0,
23 const Pica::VertexShader::OutputVertex& v1,
24 const Pica::VertexShader::OutputVertex& v2) = 0;
25
26 /// Draw the current batch of triangles
27 virtual void DrawTriangles() = 0;
28
29 /// Commit the rasterizer's framebuffer contents immediately to the current 3DS memory framebuffer
30 virtual void CommitFramebuffer() = 0;
31
32 /// Notify rasterizer that the specified PICA register has been changed
33 virtual void NotifyPicaRegisterChanged(u32 id) = 0;
34
35 /// Notify rasterizer that the specified 3DS memory region will be read from after this notification
36 virtual void NotifyPreRead(PAddr addr, u32 size) = 0;
37
38 /// Notify rasterizer that a 3DS memory region has been changed
39 virtual void NotifyFlush(PAddr addr, u32 size) = 0;
40};