swap() by blitting
This commit is contained in:
parent
ecedf56eb4
commit
363ffd3a5f
|
@ -57,7 +57,7 @@ void OpenGL_ReportARBProgramError();
|
|||
GLuint OpenGL_ReportGLError(const char *function, const char *file, int line);
|
||||
bool OpenGL_ReportFBOError(const char *function, const char *file, int line);
|
||||
|
||||
#if defined(_DEBUG) || defined(DEBUGFAST) || 1
|
||||
#if defined(_DEBUG) || defined(DEBUGFAST)
|
||||
#define GL_REPORT_ERROR() OpenGL_ReportGLError(__FUNCTION__, __FILE__, __LINE__)
|
||||
#define GL_REPORT_ERRORD() OpenGL_ReportGLError(__FUNCTION__, __FILE__, __LINE__)
|
||||
#define GL_REPORT_FBO_ERROR() OpenGL_ReportFBOError(__FUNCTION__, __FILE__, __LINE__)
|
||||
|
|
|
@ -1254,6 +1254,7 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
|
|||
else
|
||||
{
|
||||
TargetRectangle targetRc = ConvertEFBRectangle(rc);
|
||||
if(applyShader) {
|
||||
GLuint read_texture = FramebufferManager::ResolveAndGetRenderTarget(rc);
|
||||
// Render to the real buffer now.
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, 0); // switch to the window backbuffer
|
||||
|
@ -1292,13 +1293,20 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
|
|||
glBindVertexArray(0);
|
||||
glBindBuffer(GL_ARRAY_BUFFER, 0);
|
||||
|
||||
if(applyShader)
|
||||
PixelShaderCache::DisableShader();
|
||||
}
|
||||
|
||||
glBindTexture(GL_TEXTURE_RECTANGLE_ARB, 0);
|
||||
OGL::TextureCache::DisableStage(0);
|
||||
|
||||
} else {
|
||||
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
|
||||
glBindFramebuffer(GL_READ_FRAMEBUFFER, FramebufferManager::GetEFBFramebuffer());
|
||||
glBlitFramebuffer(targetRc.left, targetRc.bottom, targetRc.right, targetRc.top,
|
||||
flipped_trc.left, flipped_trc.bottom, flipped_trc.right, flipped_trc.top,
|
||||
GL_COLOR_BUFFER_BIT, GL_LINEAR);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Save screenshot
|
||||
if (s_bScreenshot)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue