OGL: Remove unnecessary renderer global references

This commit is contained in:
Lioncash 2016-08-31 14:19:56 -04:00
parent 168e145fae
commit ec7114a658

View File

@ -833,7 +833,7 @@ TargetRectangle Renderer::ConvertEFBRectangle(const EFBRectangle& rc)
// therefore the width and height are (scissorBR + 1) - scissorTL // therefore the width and height are (scissorBR + 1) - scissorTL
void Renderer::SetScissorRect(const EFBRectangle& rc) void Renderer::SetScissorRect(const EFBRectangle& rc)
{ {
TargetRectangle trc = g_renderer->ConvertEFBRectangle(rc); TargetRectangle trc = ConvertEFBRectangle(rc);
glScissor(trc.left, trc.bottom, trc.GetWidth(), trc.GetHeight()); glScissor(trc.left, trc.bottom, trc.GetWidth(), trc.GetHeight());
} }
@ -952,13 +952,13 @@ u32 Renderer::AccessEFB(EFBAccessType type, u32 x, u32 y, u32 poke_data)
{ {
if (s_MSAASamples > 1) if (s_MSAASamples > 1)
{ {
g_renderer->ResetAPIState(); ResetAPIState();
// Resolve our rectangle. // Resolve our rectangle.
FramebufferManager::GetEFBDepthTexture(efbPixelRc); FramebufferManager::GetEFBDepthTexture(efbPixelRc);
glBindFramebuffer(GL_READ_FRAMEBUFFER, FramebufferManager::GetResolvedFramebuffer()); glBindFramebuffer(GL_READ_FRAMEBUFFER, FramebufferManager::GetResolvedFramebuffer());
g_renderer->RestoreAPIState(); RestoreAPIState();
} }
std::unique_ptr<float[]> depthMap(new float[targetPixelRcWidth * targetPixelRcHeight]); std::unique_ptr<float[]> depthMap(new float[targetPixelRcWidth * targetPixelRcHeight]);
@ -991,13 +991,13 @@ u32 Renderer::AccessEFB(EFBAccessType type, u32 x, u32 y, u32 poke_data)
{ {
if (s_MSAASamples > 1) if (s_MSAASamples > 1)
{ {
g_renderer->ResetAPIState(); ResetAPIState();
// Resolve our rectangle. // Resolve our rectangle.
FramebufferManager::GetEFBColorTexture(efbPixelRc); FramebufferManager::GetEFBColorTexture(efbPixelRc);
glBindFramebuffer(GL_READ_FRAMEBUFFER, FramebufferManager::GetResolvedFramebuffer()); glBindFramebuffer(GL_READ_FRAMEBUFFER, FramebufferManager::GetResolvedFramebuffer());
g_renderer->RestoreAPIState(); RestoreAPIState();
} }
std::unique_ptr<u32[]> colorMap(new u32[targetPixelRcWidth * targetPixelRcHeight]); std::unique_ptr<u32[]> colorMap(new u32[targetPixelRcWidth * targetPixelRcHeight]);