YaGL: add a placeholder for EGL_WGL driver
authorIgor Mitsyanko <i.mitsyanko@samsung.com>
Fri, 19 Oct 2012 11:48:24 +0000 (15:48 +0400)
committerEvgeny Voevodin <e.voevodin@samsung.com>
Mon, 26 Nov 2012 09:25:35 +0000 (13:25 +0400)
It will be implemented later.

Signed-off-by: Igor Mitsyanko <i.mitsyanko@samsung.com>
Makefile.target
configure
hw/yagl_drivers/egl_wgl/yagl_egl_wgl.c [new file with mode: 0644]
hw/yagl_dyn_lib.h
hw/yagl_egl_driver.h

index 33a97b43dcc659ef6e0651f45156aa04b4d2a496..e9dad4cd2810e1329b43b193c333c31e6a74403b 100755 (executable)
@@ -182,6 +182,7 @@ $(call set-vpath, $(SRC_PATH)/hw/yagl_apis/egl: \
                   $(SRC_PATH)/hw/yagl_apis/gles1: \
                   $(SRC_PATH)/hw/yagl_apis/gles2: \
                   $(SRC_PATH)/hw/yagl_drivers/egl_glx: \
+                  $(SRC_PATH)/hw/yagl_drivers/egl_wgl: \
                   $(SRC_PATH)/hw/yagl_drivers/gles_ogl: \
                   $(SRC_PATH)/hw/yagl_drivers/gles1_ogl: \
                   $(SRC_PATH)/hw/yagl_drivers/gles2_ogl)
@@ -257,6 +258,10 @@ obj-y += yagl_host_gles2_calls.o
 ifdef CONFIG_YAGL_EGL_GLX
 obj-y += yagl_egl_glx.o
 endif
+# EGL WGL driver
+ifdef CONFIG_YAGL_EGL_WGL
+obj-y += yagl_egl_wgl.o
+endif
 # GLES OpenGL common driver
 obj-y += yagl_gles_ogl.o
 # GLESv1_CM OpenGL driver
index 246a3029da0103349b1efc680b9e876c06dfb1e6..73dfeca6929828505c773d1bb779e5097b839d27 100755 (executable)
--- a/configure
+++ b/configure
@@ -3569,6 +3569,8 @@ if test "$yagl" = "yes" ; then
   echo "CONFIG_YAGL=y" >> $config_host_mak
   if test "$linux" = "yes" ; then
     echo "CONFIG_YAGL_EGL_GLX=y" >> $config_host_mak
+  elif test "$mingw32" = "yes" ; then
+    echo "CONFIG_YAGL_EGL_WGL=y" >> $config_host_mak
   else
     echo "ERROR: YaGL is not available on $targetos"
     exit 1
diff --git a/hw/yagl_drivers/egl_wgl/yagl_egl_wgl.c b/hw/yagl_drivers/egl_wgl/yagl_egl_wgl.c
new file mode 100644 (file)
index 0000000..5519795
--- /dev/null
@@ -0,0 +1,24 @@
+#include <windows.h>
+#include <GL/wglext.h>
+#include <wingdi.h>
+#include "yagl_egl_driver.h"
+#include "yagl_dyn_lib.h"
+#include "yagl_log.h"
+#include "yagl_tls.h"
+#include "yagl_thread.h"
+
+struct yagl_egl_driver *yagl_egl_wgl_create(void)
+{
+    return NULL;
+}
+
+void *yagl_egl_wgl_procaddr_get(struct yagl_dyn_lib *dyn_lib,
+                                       const char *sym)
+{
+    void *proc = NULL;
+
+    YAGL_LOG_FUNC_ENTER_NPT(yagl_egl_wgl_get_procaddr, NULL);
+
+    YAGL_LOG_FUNC_EXIT("%p", proc);
+    return proc;
+}
index 66cec088265c8667225ab24996e97ebb975ecbd2..e301ec6974261de717c38cd9b5077ef08d0b282f 100644 (file)
@@ -17,7 +17,7 @@ void *yagl_dyn_lib_get_sym(struct yagl_dyn_lib *dyn_lib, const char* sym_name);
 
 const char *yagl_dyn_lib_get_error(struct yagl_dyn_lib *dyn_lib);
 
-#ifdef CONFIG_YAGL_EGL_GLX
+#if defined(CONFIG_YAGL_EGL_GLX)
 
 void *yagl_egl_glx_procaddr_get(struct yagl_dyn_lib *dyn_lib,
                                 const char *sym_name);
@@ -28,6 +28,17 @@ static inline void *yagl_dyn_lib_procaddr_get(struct yagl_dyn_lib *dyn_lib,
     return yagl_egl_glx_procaddr_get(dyn_lib, sym_name);
 }
 
+#elif defined(CONFIG_YAGL_EGL_WGL)
+
+void *yagl_egl_wgl_procaddr_get(struct yagl_dyn_lib *dyn_lib,
+                                const char *sym_name);
+
+static inline void *yagl_dyn_lib_procaddr_get(struct yagl_dyn_lib *dyn_lib,
+                                              const char *sym_name)
+{
+    return yagl_egl_wgl_procaddr_get(dyn_lib, sym_name);
+}
+
 #else
 #error Unknown EGL backend
 #endif
index e8a40047b5acfbed263fdf57feec75fdc2956c64..f0fbb82ae1417c57994149e765442ab58c0004c8 100644 (file)
@@ -103,7 +103,7 @@ struct yagl_egl_driver
     struct yagl_dyn_lib *dyn_lib;
 };
 
-#ifdef CONFIG_YAGL_EGL_GLX
+#if defined(CONFIG_YAGL_EGL_GLX)
 
 struct yagl_egl_driver *yagl_egl_glx_create(void);
 
@@ -112,6 +112,15 @@ static inline struct yagl_egl_driver *yagl_egl_create(void)
     return yagl_egl_glx_create();
 }
 
+#elif defined(CONFIG_YAGL_EGL_WGL)
+
+struct yagl_egl_driver *yagl_egl_wgl_create(void);
+
+static inline struct yagl_egl_driver *yagl_egl_create(void)
+{
+    return yagl_egl_wgl_create();
+}
+
 #else
 #error Unknown EGL backend
 #endif