diff options
author | wm4 <wm4@nowhere> | 2015-09-02 12:52:11 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-09-02 13:17:23 +0200 |
commit | ebf80c07e317486bdeb89a845f388bd397282094 (patch) | |
tree | f8e603700b11a5c91c2192d4aed67d02363c2bd8 /video/out/gl_utils.c | |
parent | 8ffbb22c270aeef063755fc9b00c4d272959d930 (diff) | |
download | mpv-ebf80c07e317486bdeb89a845f388bd397282094.tar.bz2 mpv-ebf80c07e317486bdeb89a845f388bd397282094.tar.xz |
vo_opengl: don't distinguish "real" and texture size
This is from times when we supported padded/non-NPOT textures. The
difference is not useful anymore, and theoretical support for different
sizes is most likely buggy and unmaintained. So remove it.
Also remove the tex_ prefix wherever it appears.
Diffstat (limited to 'video/out/gl_utils.c')
-rw-r--r-- | video/out/gl_utils.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/video/out/gl_utils.c b/video/out/gl_utils.c index 6b9494f126..7e13f839d6 100644 --- a/video/out/gl_utils.c +++ b/video/out/gl_utils.c @@ -335,12 +335,12 @@ bool fbotex_change(struct fbotex *fbo, GL *gl, struct mp_log *log, int w, int h, int cw = w, ch = h; - if ((flags & FBOTEX_FUZZY_W) && cw < fbo->tex_w) - cw = fbo->tex_w; - if ((flags & FBOTEX_FUZZY_H) && ch < fbo->tex_h) - ch = fbo->tex_h; + if ((flags & FBOTEX_FUZZY_W) && cw < fbo->w) + cw = fbo->w; + if ((flags & FBOTEX_FUZZY_H) && ch < fbo->h) + ch = fbo->h; - if (fbo->tex_w == cw && fbo->tex_h == ch && fbo->iformat == iformat) + if (fbo->w == cw && fbo->h == ch && fbo->iformat == iformat) return true; if (flags & FBOTEX_FUZZY_W) @@ -352,12 +352,12 @@ bool fbotex_change(struct fbotex *fbo, GL *gl, struct mp_log *log, int w, int h, *fbo = (struct fbotex) { .gl = gl, - .tex_w = w, - .tex_h = h, + .w = w, + .h = h, .iformat = iformat, }; - mp_verbose(log, "Create FBO: %dx%d\n", fbo->tex_w, fbo->tex_h); + mp_verbose(log, "Create FBO: %dx%d\n", fbo->w, fbo->h); if (!(gl->mpgl_caps & MPGL_CAP_FB)) return false; @@ -365,7 +365,7 @@ bool fbotex_change(struct fbotex *fbo, GL *gl, struct mp_log *log, int w, int h, gl->GenFramebuffers(1, &fbo->fbo); gl->GenTextures(1, &fbo->texture); gl->BindTexture(GL_TEXTURE_2D, fbo->texture); - gl->TexImage2D(GL_TEXTURE_2D, 0, iformat, fbo->tex_w, fbo->tex_h, 0, + gl->TexImage2D(GL_TEXTURE_2D, 0, iformat, fbo->w, fbo->h, 0, GL_RGBA, GL_UNSIGNED_BYTE, 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); |