]> git.sesse.net Git - mlt/commitdiff
Use GL_RBGA8 as internal format.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 25 Jan 2014 18:34:11 +0000 (19:34 +0100)
committerDan Dennedy <dan@dennedy.org>
Mon, 27 Jan 2014 00:46:19 +0000 (16:46 -0800)
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

index 19831177ecec5880b9c2a83d39d326766f25716c..100c3ab1ac420c7a2906872852178a5ed2d987fc 100644 (file)
@@ -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;