summaryrefslogtreecommitdiff
path: root/src/video_core
diff options
context:
space:
mode:
authorGravatar bunnei2014-04-27 21:25:16 -0400
committerGravatar bunnei2014-04-27 21:25:16 -0400
commit438dba40c1def91e9de252ef05f8650464e5c0c2 (patch)
tree8f323d6095dfefe9d00f34cc4d7229be58a9f409 /src/video_core
parentMerge pull request #4 from cpp3ds/master (diff)
parentremoved DISALLOW_COPY_AND_ASSIGN in favor of NonCopyable class (diff)
downloadyuzu-438dba40c1def91e9de252ef05f8650464e5c0c2.tar.gz
yuzu-438dba40c1def91e9de252ef05f8650464e5c0c2.tar.xz
yuzu-438dba40c1def91e9de252ef05f8650464e5c0c2.zip
Merge branch 'hle-interface-updates'
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/renderer_base.h4
-rw-r--r--src/video_core/renderer_opengl/renderer_opengl.cpp11
-rw-r--r--src/video_core/renderer_opengl/renderer_opengl.h5
3 files changed, 8 insertions, 12 deletions
diff --git a/src/video_core/renderer_base.h b/src/video_core/renderer_base.h
index bc65bf0ce..2650620b4 100644
--- a/src/video_core/renderer_base.h
+++ b/src/video_core/renderer_base.h
@@ -6,7 +6,7 @@
6 6
7#include "common/common.h" 7#include "common/common.h"
8 8
9class RendererBase { 9class RendererBase : NonCopyable {
10public: 10public:
11 11
12 /// Used to reference a framebuffer 12 /// Used to reference a framebuffer
@@ -52,6 +52,4 @@ protected:
52 f32 m_current_fps; ///< Current framerate, should be set by the renderer 52 f32 m_current_fps; ///< Current framerate, should be set by the renderer
53 int m_current_frame; ///< Current frame, should be set by the renderer 53 int m_current_frame; ///< Current frame, should be set by the renderer
54 54
55private:
56 DISALLOW_COPY_AND_ASSIGN(RendererBase);
57}; 55};
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp
index cf7b029ab..b63a73d18 100644
--- a/src/video_core/renderer_opengl/renderer_opengl.cpp
+++ b/src/video_core/renderer_opengl/renderer_opengl.cpp
@@ -53,12 +53,11 @@ void RendererOpenGL::SwapBuffers() {
53 53
54/** 54/**
55 * Helper function to flip framebuffer from left-to-right to top-to-bottom 55 * Helper function to flip framebuffer from left-to-right to top-to-bottom
56 * @param addr Address of framebuffer in RAM 56 * @param in Pointer to input raw framebuffer in V/RAM
57 * @param out Pointer to output buffer with flipped framebuffer 57 * @param out Pointer to output buffer with flipped framebuffer
58 * @todo Early on hack... I'd like to find a more efficient way of doing this /bunnei 58 * @todo Early on hack... I'd like to find a more efficient way of doing this /bunnei
59 */ 59 */
60void RendererOpenGL::FlipFramebuffer(u32 addr, u8* out) { 60void RendererOpenGL::FlipFramebuffer(const u8* in, u8* out) {
61 u8* in = Memory::GetPointer(addr);
62 for (int y = 0; y < VideoCore::kScreenTopHeight; y++) { 61 for (int y = 0; y < VideoCore::kScreenTopHeight; y++) {
63 for (int x = 0; x < VideoCore::kScreenTopWidth; x++) { 62 for (int x = 0; x < VideoCore::kScreenTopWidth; x++) {
64 int in_coord = (VideoCore::kScreenTopHeight * 3 * x) + (VideoCore::kScreenTopHeight * 3) 63 int in_coord = (VideoCore::kScreenTopHeight * 3 * x) + (VideoCore::kScreenTopHeight * 3)
@@ -77,10 +76,10 @@ void RendererOpenGL::FlipFramebuffer(u32 addr, u8* out) {
77 * @param src_rect Source rectangle in XFB to copy 76 * @param src_rect Source rectangle in XFB to copy
78 * @param dst_rect Destination rectangle in output framebuffer to copy to 77 * @param dst_rect Destination rectangle in output framebuffer to copy to
79 */ 78 */
80void RendererOpenGL::RenderXFB(const Rect& src_rect, const Rect& dst_rect) { 79void RendererOpenGL::RenderXFB(const Rect& src_rect, const Rect& dst_rect) {
81 80
82 FlipFramebuffer(LCD::TOP_RIGHT_FRAME1, m_xfb_top_flipped); 81 FlipFramebuffer(LCD::GetFramebufferPointer(LCD::g_regs.framebuffer_top_left_1), m_xfb_top_flipped);
83 FlipFramebuffer(LCD::SUB_FRAME1, m_xfb_bottom_flipped); 82 FlipFramebuffer(LCD::GetFramebufferPointer(LCD::g_regs.framebuffer_sub_left_1), m_xfb_bottom_flipped);
84 83
85 // Blit the top framebuffer 84 // Blit the top framebuffer
86 // ------------------------ 85 // ------------------------
diff --git a/src/video_core/renderer_opengl/renderer_opengl.h b/src/video_core/renderer_opengl/renderer_opengl.h
index 00aa17649..4c0b6e59d 100644
--- a/src/video_core/renderer_opengl/renderer_opengl.h
+++ b/src/video_core/renderer_opengl/renderer_opengl.h
@@ -55,11 +55,11 @@ private:
55 55
56 /** 56 /**
57 * Helper function to flip framebuffer from left-to-right to top-to-bottom 57 * Helper function to flip framebuffer from left-to-right to top-to-bottom
58 * @param addr Address of framebuffer in RAM 58 * @param in Pointer to input raw framebuffer in V/RAM
59 * @param out Pointer to output buffer with flipped framebuffer 59 * @param out Pointer to output buffer with flipped framebuffer
60 * @todo Early on hack... I'd like to find a more efficient way of doing this /bunnei 60 * @todo Early on hack... I'd like to find a more efficient way of doing this /bunnei
61 */ 61 */
62 void RendererOpenGL::FlipFramebuffer(u32 addr, u8* out); 62 void RendererOpenGL::FlipFramebuffer(const u8* in, u8* out);
63 63
64 64
65 EmuWindow* m_render_window; ///< Handle to render window 65 EmuWindow* m_render_window; ///< Handle to render window
@@ -87,5 +87,4 @@ private:
87 u8 m_xfb_top_flipped[VideoCore::kScreenTopWidth * VideoCore::kScreenTopWidth * 4]; 87 u8 m_xfb_top_flipped[VideoCore::kScreenTopWidth * VideoCore::kScreenTopWidth * 4];
88 u8 m_xfb_bottom_flipped[VideoCore::kScreenTopWidth * VideoCore::kScreenTopWidth * 4]; 88 u8 m_xfb_bottom_flipped[VideoCore::kScreenTopWidth * VideoCore::kScreenTopWidth * 4];
89 89
90 DISALLOW_COPY_AND_ASSIGN(RendererOpenGL);
91}; \ No newline at end of file 90}; \ No newline at end of file