36 lines
1.6 KiB
Diff
36 lines
1.6 KiB
Diff
From f19a168cc2e519250f259e049e4b443616aab5a0 Mon Sep 17 00:00:00 2001
|
|
From: ptitSeb <sebastien.chev@gmail.com>
|
|
Date: Mon, 2 Jan 2023 17:26:46 +0100
|
|
Subject: [PATCH 230/233] Small optim/fix on previous commit
|
|
|
|
---
|
|
src/gl/framebuffers.c | 8 +++++---
|
|
1 file changed, 5 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/src/gl/framebuffers.c b/src/gl/framebuffers.c
|
|
index e0734d0b..653cb03e 100644
|
|
--- a/src/gl/framebuffers.c
|
|
+++ b/src/gl/framebuffers.c
|
|
@@ -1439,13 +1439,15 @@ void APIENTRY_GL4ES gl4es_glBlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX
|
|
nheight = tex->nheight;
|
|
glname = tex->glname;
|
|
if(!created) {
|
|
- if(tex->actual.min_filter!=filter || tex->actual.mag_filter!=filter) {
|
|
+ if((tex->actual.min_filter!=filter) || (tex->actual.mag_filter!=filter)) {
|
|
gltexture_t *old = glstate->texture.bound[ENABLED_TEX2D][0];
|
|
- gl4es_glBindTexture(GL_TEXTURE_2D, texture);
|
|
+ if(old->texture != glname);
|
|
+ gl4es_glBindTexture(GL_TEXTURE_2D, glname);
|
|
gl4es_glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, filter);
|
|
gl4es_glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, filter);
|
|
tex->actual.min_filter = tex->actual.mag_filter = filter;
|
|
- gl4es_glBindTexture(GL_TEXTURE_2D, old->texture);
|
|
+ if(old->texture != glname);
|
|
+ gl4es_glBindTexture(GL_TEXTURE_2D, old->texture);
|
|
}
|
|
}
|
|
} else {
|
|
--
|
|
2.11.0
|
|
|