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
Version 0.2.1 - 13.May.2010
* Fix OpenGL texture internal format (Clutter)
* Fix integration within the playbin2 pipeline
* Fix vaapidecode to expose the HW supported caps only
* Add GstXOverlay interface to vaapisink (e.g. for Totem)

View file

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