From f30703f921a420282520d1d9237d1e37aa5ff95f Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sat, 25 Jan 2014 19:34:11 +0100 Subject: [PATCH] Use GL_RBGA8 as internal format. It is technically allowed to use GL_RGBA as internal format, but then it is undefined whether you get 4-bit, 8-bit, 10-bit or something else. Set it explicitly. (Since we give in a NULL pointer, we can give whatever external format we want; just hardcode it to GL_RGBA.) --- src/modules/opengl/filter_glsl_manager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/opengl/filter_glsl_manager.cpp b/src/modules/opengl/filter_glsl_manager.cpp index 19831177..100c3ab1 100644 --- a/src/modules/opengl/filter_glsl_manager.cpp +++ b/src/modules/opengl/filter_glsl_manager.cpp @@ -190,7 +190,7 @@ glsl_texture GlslManager::get_texture(int width, int height, GLint internal_form } glBindTexture( GL_TEXTURE_2D, tex ); - glTexImage2D( GL_TEXTURE_2D, 0, internal_format, width, height, 0, internal_format, GL_UNSIGNED_BYTE, NULL ); + glTexImage2D( GL_TEXTURE_2D, 0, internal_format, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL ); glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE ); glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST ); @@ -415,7 +415,7 @@ int GlslManager::render_frame_texture(EffectChain *chain, mlt_frame frame, int w { glsl_fbo fbo = get_fbo( width, height ); if (!fbo) return 1; - glsl_texture texture = get_texture( width, height, GL_RGBA ); + glsl_texture texture = get_texture( width, height, GL_RGBA8 ); if (!texture) { release_fbo( fbo ); return 1; @@ -466,7 +466,7 @@ int GlslManager::render_frame_rgba(EffectChain *chain, mlt_frame frame, int widt { glsl_fbo fbo = get_fbo( width, height ); if (!fbo) return 1; - glsl_texture texture = get_texture( width, height, GL_RGBA ); + glsl_texture texture = get_texture( width, height, GL_RGBA8 ); if (!texture) { release_fbo( fbo ); return 1; -- 2.39.2