Fix OpenGL texture internal format (Clutter).

This commit is contained in:
gb 2010-05-13 06:11:42 +00:00 committed by Gwenole Beauchesne
parent 527e1f03e4
commit 0e0426582e
2 changed files with 5 additions and 1 deletions

1
NEWS
View file

@ -2,6 +2,7 @@ gst-vaapi NEWS -- summary of changes. 2010-05-13
Copyright (C) 2010 Splitted-Desktop Systems Copyright (C) 2010 Splitted-Desktop Systems
Version 0.2.1 - 13.May.2010 Version 0.2.1 - 13.May.2010
* Fix OpenGL texture internal format (Clutter)
* Fix integration within the playbin2 pipeline * Fix integration within the playbin2 pipeline
* Fix vaapidecode to expose the HW supported caps only * Fix vaapidecode to expose the HW supported caps only
* Add GstXOverlay interface to vaapisink (e.g. for Totem) * Add GstXOverlay interface to vaapisink (e.g. for Totem)

View file

@ -554,10 +554,12 @@ gl_unbind_texture(GLTextureState *ts)
GLuint GLuint
gl_create_texture(GLenum target, GLenum format, guint width, guint height) gl_create_texture(GLenum target, GLenum format, guint width, guint height)
{ {
GLenum internal_format;
GLuint texture; GLuint texture;
GLTextureState ts; GLTextureState ts;
guint bytes_per_component; guint bytes_per_component;
internal_format = format;
switch (format) { switch (format) {
case GL_LUMINANCE: case GL_LUMINANCE:
bytes_per_component = 1; bytes_per_component = 1;
@ -567,6 +569,7 @@ gl_create_texture(GLenum target, GLenum format, guint width, guint height)
break; break;
case GL_RGBA: case GL_RGBA:
case GL_BGRA: case GL_BGRA:
internal_format = GL_RGBA;
bytes_per_component = 4; bytes_per_component = 4;
break; break;
default: default:
@ -586,7 +589,7 @@ gl_create_texture(GLenum target, GLenum format, guint width, guint height)
glTexImage2D( glTexImage2D(
target, target,
0, 0,
bytes_per_component, internal_format,
width, height, width, height,
0, 0,
format, format,