[RFCv2 3/9] gl-renderer: Add optional support for desktop OpenGL.

Pekka Paalanen ppaalanen at gmail.com
Mon Nov 19 00:46:12 PST 2012


On Sat, 17 Nov 2012 03:23:54 +0100
John Kåre Alsaker <john.kare.alsaker at gmail.com> wrote:

> This adds support for desktop OpenGL which can be enabled by with
> ./configure --enable-opengl.
> 
> Most of the differences in API between OpenGL and OpenGL ES is hidden by
> the new gl_renderer fields.
> 
> It also accesses GLES2 extensions by including GLES2/gl2platform.h directly.
> ---
>  configure.ac         | 13 +++++++++-
>  src/Makefile.am      |  4 +--
>  src/compositor-rpi.c |  2 +-
>  src/compositor.h     |  1 +
>  src/gl-internal.h    |  7 +++---
>  src/gl-renderer.c    | 69 +++++++++++++++++++++++++++++++++++-----------------
>  src/gl-renderer.h    | 19 +++++++++++++++
>  src/gl-shaders.c     |  5 ++--
>  8 files changed, 89 insertions(+), 31 deletions(-)

> diff --git a/src/gl-internal.h b/src/gl-internal.h
> index 994c139..83b351f 100644
> --- a/src/gl-internal.h
> +++ b/src/gl-internal.h
> @@ -24,9 +24,6 @@
>  #ifndef _GL_INTERNAL_H_
>  #define _GL_INTERNAL_H_
>  
> -#include <GLES2/gl2.h>
> -#include <GLES2/gl2ext.h>
> -
>  #include <stdlib.h>
>  #include <string.h>
>  #include <ctype.h>
> @@ -106,6 +103,10 @@ struct gl_renderer {
>  		int32_t width, height;
>  	} border;
>  
> +	GLenum bgra_internal_format, bgra_format;
> +	GLenum rgba16_internal_format;

Just noticed, rgba16 format is set but not used here, so it would
belong to the linear blending patch.

Are you sure it doesn't depend on an extension?


Thanks,
pq


More information about the wayland-devel mailing list