mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-25 19:55:50 +00:00
VideoBackends: Store a backbuffer 'scale'
This is a scaling factor, used for hi-dpi configurations.
This commit is contained in:
parent
e03b8e899e
commit
c9c0b85056
15 changed files with 26 additions and 17 deletions
|
@ -351,10 +351,10 @@ static void InitDriverInfo()
|
|||
}
|
||||
|
||||
// Init functions
|
||||
Renderer::Renderer(std::unique_ptr<GLContext> main_gl_context)
|
||||
Renderer::Renderer(std::unique_ptr<GLContext> main_gl_context, float backbuffer_scale)
|
||||
: ::Renderer(static_cast<int>(std::max(main_gl_context->GetBackBufferWidth(), 1u)),
|
||||
static_cast<int>(std::max(main_gl_context->GetBackBufferHeight(), 1u)),
|
||||
AbstractTextureFormat::RGBA8),
|
||||
backbuffer_scale, AbstractTextureFormat::RGBA8),
|
||||
m_main_gl_context(std::move(main_gl_context)),
|
||||
m_current_rasterization_state(RenderState::GetInvalidRasterizationState()),
|
||||
m_current_depth_state(RenderState::GetInvalidDepthState()),
|
||||
|
|
|
@ -83,7 +83,7 @@ extern VideoConfig g_ogl_config;
|
|||
class Renderer : public ::Renderer
|
||||
{
|
||||
public:
|
||||
Renderer(std::unique_ptr<GLContext> main_gl_context);
|
||||
Renderer(std::unique_ptr<GLContext> main_gl_context, float backbuffer_scale);
|
||||
~Renderer() override;
|
||||
|
||||
bool IsHeadless() const override;
|
||||
|
|
|
@ -172,7 +172,7 @@ bool VideoBackend::Initialize(const WindowSystemInfo& wsi)
|
|||
if (!InitializeGLExtensions(main_gl_context.get()) || !FillBackendInfo())
|
||||
return false;
|
||||
|
||||
g_renderer = std::make_unique<Renderer>(std::move(main_gl_context));
|
||||
g_renderer = std::make_unique<Renderer>(std::move(main_gl_context), wsi.render_surface_scale);
|
||||
g_vertex_manager = std::make_unique<VertexManager>();
|
||||
g_perf_query = GetPerfQuery();
|
||||
ProgramShaderCache::Init();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue