[PATCH weston] gl-renderer: Add a #define to obtain the prototypes from the gl2 header.
Emil Velikov
emil.l.velikov at gmail.com
Thu Sep 1 14:32:08 UTC 2016
On 1 September 2016 at 15:12, Emmanuel Gil Peyrot
<emmanuel.peyrot at collabora.com> wrote:
> This prevents a segfault when running on Mesa master, due to the GLES2
> symbols not being declared with the correct prototype (or at all).
>
> Signed-off-by: Emmanuel Gil Peyrot <emmanuel.peyrot at collabora.com>
> ---
> libweston/gl-renderer.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c
> index 031576b..3979c3a 100644
> --- a/libweston/gl-renderer.c
> +++ b/libweston/gl-renderer.c
> @@ -26,6 +26,7 @@
>
> #include "config.h"
>
> +#define GL_GLEXT_PROTOTYPES
General rule of thumb is that:
- Extension symbols are fetched via the {wgl,glX,egl}GetProcAddress APIs
- By defining *_PROTOTYPES you explicitly acknowledge that your
program is _not_ portable.
Yet again, it could be that there's something busted in mesa which
will require this, in which case you want a big warning/message and a
friendly poke to mesa-dev/bugzilla :-)
Thanks
Emil
More information about the wayland-devel
mailing list