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

John Kåre Alsaker john.kare.alsaker at gmail.com
Mon Nov 19 06:25:15 PST 2012


On Mon, Nov 19, 2012 at 9:46 AM, Pekka Paalanen <ppaalanen at gmail.com> wrote:
> 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.
Yeah, it's a refactoring artifact.

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

>
>
> Thanks,
> pq


More information about the wayland-devel mailing list