summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--video/out/opengl/utils.c19
-rw-r--r--video/out/opengl/utils.h2
2 files changed, 2 insertions, 19 deletions
diff --git a/video/out/opengl/utils.c b/video/out/opengl/utils.c
index f9f31e31cc..c38b7bbcbc 100644
--- a/video/out/opengl/utils.c
+++ b/video/out/opengl/utils.c
@@ -303,8 +303,6 @@ bool fbotex_change(struct fbotex *fbo, GL *gl, struct mp_log *log, int w, int h,
}
assert(gl->mpgl_caps & MPGL_CAP_FB);
- GLenum filter = fbo->tex_filter;
-
fbotex_uninit(fbo);
*fbo = (struct fbotex) {
@@ -323,10 +321,10 @@ bool fbotex_change(struct fbotex *fbo, GL *gl, struct mp_log *log, int w, int h,
format->format, format->type, NULL);
gl->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
gl->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+ gl->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ gl->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
gl->BindTexture(GL_TEXTURE_2D, 0);
- fbotex_set_filter(fbo, filter ? filter : GL_LINEAR);
-
gl_check_error(gl, log, "after creating framebuffer texture");
gl->BindFramebuffer(GL_FRAMEBUFFER, fbo->fbo);
@@ -347,19 +345,6 @@ bool fbotex_change(struct fbotex *fbo, GL *gl, struct mp_log *log, int w, int h,
return res;
}
-void fbotex_set_filter(struct fbotex *fbo, GLenum tex_filter)
-{
- GL *gl = fbo->gl;
-
- if (fbo->tex_filter != tex_filter && fbo->texture) {
- gl->BindTexture(GL_TEXTURE_2D, fbo->texture);
- gl->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, tex_filter);
- gl->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, tex_filter);
- gl->BindTexture(GL_TEXTURE_2D, 0);
- }
- fbo->tex_filter = tex_filter;
-}
-
void fbotex_uninit(struct fbotex *fbo)
{
GL *gl = fbo->gl;
diff --git a/video/out/opengl/utils.h b/video/out/opengl/utils.h
index 48e139dcc7..ba36a59316 100644
--- a/video/out/opengl/utils.h
+++ b/video/out/opengl/utils.h
@@ -55,7 +55,6 @@ struct fbotex {
GLuint fbo;
GLuint texture;
GLenum iformat;
- GLenum tex_filter;
int rw, rh; // real (texture) size
int lw, lh; // logical (configured) size
};
@@ -68,7 +67,6 @@ bool fbotex_change(struct fbotex *fbo, GL *gl, struct mp_log *log, int w, int h,
#define FBOTEX_FUZZY_W 1
#define FBOTEX_FUZZY_H 2
#define FBOTEX_FUZZY (FBOTEX_FUZZY_W | FBOTEX_FUZZY_H)
-void fbotex_set_filter(struct fbotex *fbo, GLenum gl_filter);
void fbotex_invalidate(struct fbotex *fbo);
// A 3x2 matrix, with the translation part separate.