summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-12-17 21:35:05 +0100
committerwm4 <wm4@nowhere>2014-12-17 21:35:05 +0100
commit4681e7f49f63ec7f69689e8f30fa60cf4d01794c (patch)
tree247f07363f367520b94f6a321177108c628284d6 /video
parent631ec3cc33ce6a73bd533561c18fd88289ed54c4 (diff)
downloadmpv-4681e7f49f63ec7f69689e8f30fa60cf4d01794c.tar.bz2
mpv-4681e7f49f63ec7f69689e8f30fa60cf4d01794c.tar.xz
vo_opengl: switch default FBO format to rgba, use GL_RGBA
I'm hoping this is generally more compatible, and it works with GLES. This probably has not much of an effect on desktop GL. It also switches only the default format for --vo=opengl, not --vo=opengl-hq. "-hq" already uses GL_RGBA16, though since it's a sized format, the story is a bit different, and it won't work on GLES either.
Diffstat (limited to 'video')
-rw-r--r--video/out/gl_video.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/video/out/gl_video.c b/video/out/gl_video.c
index f37c715356..c7b05a9551 100644
--- a/video/out/gl_video.c
+++ b/video/out/gl_video.c
@@ -295,7 +295,7 @@ const struct gl_video_opts gl_video_opts_def = {
.npot = 1,
.dither_depth = -1,
.dither_size = 6,
- .fbo_format = GL_RGB,
+ .fbo_format = GL_RGBA,
.scale_sep = 1,
.scalers = { "bilinear", "bilinear" },
.scaler_params = {{NAN, NAN}, {NAN, NAN}},
@@ -525,8 +525,11 @@ static bool fbotex_init(struct gl_video *p, struct fbotex *fbo, int w, int h,
gl->BindTexture(p->gl_target, fbo->texture);
gl->TexImage2D(p->gl_target, 0, iformat,
fbo->tex_w, fbo->tex_h, 0,
- GL_RGB, GL_UNSIGNED_BYTE, NULL);
+ GL_RGBA, GL_UNSIGNED_BYTE, NULL);
default_tex_params(gl, p->gl_target, GL_LINEAR);
+
+ debug_check_gl(p, "after creating framebuffer texture");
+
gl->BindFramebuffer(GL_FRAMEBUFFER, fbo->fbo);
gl->FramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
p->gl_target, fbo->texture, 0);
@@ -540,7 +543,7 @@ static bool fbotex_init(struct gl_video *p, struct fbotex *fbo, int w, int h,
gl->BindFramebuffer(GL_FRAMEBUFFER, 0);
- debug_check_gl(p, "after creating framebuffer & associated texture");
+ debug_check_gl(p, "after creating framebuffer");
return res;
}