mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
VideoCommon/RenderBase: Remove dependency on renderer global within renderer
There's no need to have a dependency when we can simply call the function itself as part of the instance itself.
This commit is contained in:
@ -629,8 +629,8 @@ void Renderer::ScaleTexture(AbstractFramebuffer* dst_framebuffer,
|
|||||||
BeginUtilityDrawing();
|
BeginUtilityDrawing();
|
||||||
|
|
||||||
// The shader needs to know the source rectangle.
|
// The shader needs to know the source rectangle.
|
||||||
const auto converted_src_rect = g_renderer->ConvertFramebufferRectangle(
|
const auto converted_src_rect =
|
||||||
src_rect, src_texture->GetWidth(), src_texture->GetHeight());
|
ConvertFramebufferRectangle(src_rect, src_texture->GetWidth(), src_texture->GetHeight());
|
||||||
const float rcp_src_width = 1.0f / src_texture->GetWidth();
|
const float rcp_src_width = 1.0f / src_texture->GetWidth();
|
||||||
const float rcp_src_height = 1.0f / src_texture->GetHeight();
|
const float rcp_src_height = 1.0f / src_texture->GetHeight();
|
||||||
const std::array<float, 4> uniforms = {{converted_src_rect.left * rcp_src_width,
|
const std::array<float, 4> uniforms = {{converted_src_rect.left * rcp_src_width,
|
||||||
@ -1036,7 +1036,7 @@ bool Renderer::InitializeImGui()
|
|||||||
pconfig.framebuffer_state.samples = 1;
|
pconfig.framebuffer_state.samples = 1;
|
||||||
pconfig.framebuffer_state.per_sample_shading = false;
|
pconfig.framebuffer_state.per_sample_shading = false;
|
||||||
pconfig.usage = AbstractPipelineUsage::Utility;
|
pconfig.usage = AbstractPipelineUsage::Utility;
|
||||||
m_imgui_pipeline = g_renderer->CreatePipeline(pconfig);
|
m_imgui_pipeline = CreatePipeline(pconfig);
|
||||||
if (!m_imgui_pipeline)
|
if (!m_imgui_pipeline)
|
||||||
{
|
{
|
||||||
PanicAlert("Failed to create imgui pipeline");
|
PanicAlert("Failed to create imgui pipeline");
|
||||||
|
Reference in New Issue
Block a user