summaryrefslogblamecommitdiffstats
path: root/src/video_core/renderer_base.cpp
blob: dbe3edf09a6e6d25d0a025c56fa7af557d8ebafc (plain) (tree)
1
2
3
4
5
6
7
8




                                            
                                     
                                     
                                                     








                                                                                   
 

                                               
                                                                       

     
// Copyright 2015 Citra Emulator Project
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.

#include <memory>
#include "core/frontend/emu_window.h"
#include "video_core/renderer_base.h"
#include "video_core/renderer_opengl/gl_rasterizer.h"

RendererBase::RendererBase(EmuWindow& window) : render_window{window} {}
RendererBase::~RendererBase() = default;

void RendererBase::UpdateCurrentFramebufferLayout() {
    const Layout::FramebufferLayout& layout = render_window.GetFramebufferLayout();

    render_window.UpdateCurrentFramebufferLayout(layout.width, layout.height);
}

void RendererBase::RefreshRasterizerSetting() {
    if (rasterizer == nullptr) {
        rasterizer = std::make_unique<RasterizerOpenGL>(render_window);
    }
}