summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Versace <chad.versace@linux.intel.com>2013-08-18 09:01:34 -0700
committerChad Versace <chad.versace@linux.intel.com>2013-08-18 09:11:34 -0700
commitde4525ecdb56580095164d9834fa6aceb41f8c65 (patch)
tree34d0b685ea075d4dd69fd8aee9e1b81ddde27b16
parentbd6466164e9a4881e0114142561b546401eca76c (diff)
egl: Add header to import symbols from new EGL extensions
Waffle uses some EGL extensions that are fairly recent, so recent that some systems' EGL headers lack the extensions. This header imports the needed symbols from those extensions. The only extension imported by this commit is EGL_KHR_create_context. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
-rw-r--r--src/waffle/egl/wegl_config.c1
-rw-r--r--src/waffle/egl/wegl_context.c1
-rw-r--r--src/waffle/egl/wegl_display.c1
-rw-r--r--src/waffle/egl/wegl_imports.h52
-rw-r--r--src/waffle/egl/wegl_util.c1
-rw-r--r--src/waffle/egl/wegl_window.c1
6 files changed, 57 insertions, 0 deletions
diff --git a/src/waffle/egl/wegl_config.c b/src/waffle/egl/wegl_config.c
index fb05287..98e470b 100644
--- a/src/waffle/egl/wegl_config.c
+++ b/src/waffle/egl/wegl_config.c
@@ -32,6 +32,7 @@
#include "wegl_config.h"
#include "wegl_display.h"
+#include "wegl_imports.h"
#include "wegl_util.h"
/// @brief Check the WAFFLE_CONTEXT_* attributes.
diff --git a/src/waffle/egl/wegl_context.c b/src/waffle/egl/wegl_context.c
index 767c095..006aee3 100644
--- a/src/waffle/egl/wegl_context.c
+++ b/src/waffle/egl/wegl_context.c
@@ -30,6 +30,7 @@
#include "wegl_config.h"
#include "wegl_context.h"
+#include "wegl_imports.h"
#include "wegl_util.h"
static bool
diff --git a/src/waffle/egl/wegl_display.c b/src/waffle/egl/wegl_display.c
index e98909c..0716a32 100644
--- a/src/waffle/egl/wegl_display.c
+++ b/src/waffle/egl/wegl_display.c
@@ -29,6 +29,7 @@
#include "wcore_platform.h"
#include "wegl_display.h"
+#include "wegl_imports.h"
#include "wegl_util.h"
static bool
diff --git a/src/waffle/egl/wegl_imports.h b/src/waffle/egl/wegl_imports.h
new file mode 100644
index 0000000..dd95a30
--- /dev/null
+++ b/src/waffle/egl/wegl_imports.h
@@ -0,0 +1,52 @@
+// Copyright 2013 Intel Corporation
+//
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// - Redistributions of source code must retain the above copyright notice, this
+// list of conditions and the following disclaimer.
+//
+// - Redistributions in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation
+// and/or other materials provided with the distribution.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/// @file Imports from EGL headers.
+///
+/// Waffle uses some EGL extensions that are fairly recent, so recent that some
+/// systems' EGL headers lack the extensions. This header imports the needed
+/// symbols from those extensions.
+
+#pragma once
+
+#include <EGL/egl.h>
+#include <EGL/eglext.h>
+
+#ifndef EGL_KHR_create_context
+#define EGL_KHR_create_context 1
+#define EGL_CONTEXT_MAJOR_VERSION_KHR EGL_CONTEXT_CLIENT_VERSION
+#define EGL_CONTEXT_MINOR_VERSION_KHR 0x30FB
+#define EGL_CONTEXT_FLAGS_KHR 0x30FC
+#define EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR 0x30FD
+#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR 0x31BD
+#define EGL_NO_RESET_NOTIFICATION_KHR 0x31BE
+#define EGL_LOSE_CONTEXT_ON_RESET_KHR 0x31BF
+#define EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR 0x00000001
+#define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR 0x00000002
+#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR 0x00000004
+#define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR 0x00000001
+#define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT_KHR 0x00000002
+#define EGL_OPENGL_ES3_BIT_KHR 0x00000040
+#endif
diff --git a/src/waffle/egl/wegl_util.c b/src/waffle/egl/wegl_util.c
index 2cf83ad..eb2415b 100644
--- a/src/waffle/egl/wegl_util.c
+++ b/src/waffle/egl/wegl_util.c
@@ -27,6 +27,7 @@
#include "wegl_context.h"
#include "wegl_display.h"
+#include "wegl_imports.h"
#include "wegl_util.h"
#include "wegl_window.h"
diff --git a/src/waffle/egl/wegl_window.c b/src/waffle/egl/wegl_window.c
index df38364..e16b61d 100644
--- a/src/waffle/egl/wegl_window.c
+++ b/src/waffle/egl/wegl_window.c
@@ -25,6 +25,7 @@
#include "wegl_config.h"
#include "wegl_display.h"
+#include "wegl_imports.h"
#include "wegl_util.h"
#include "wegl_window.h"