summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Bragg <robert@linux.intel.com>2011-04-18 17:45:36 +0100
committerRobert Bragg <robert@linux.intel.com>2011-05-03 11:43:24 +0100
commitca92b2a4287a76a1c6feb815d9bbdc9d835031dc (patch)
treeb98e695b67da557caca8c228bd66c58337d26ed2
parente9bc679eba43d18d730f2d6817b1af1f3d5a1321 (diff)
downloadclutter-ca92b2a4287a76a1c6feb815d9bbdc9d835031dc.tar.gz
cogl: remove OSX/WIN32 specific bits in favour of a stub winsys
Until Cogl gains native win32/OSX support this remove the osx and win32 winsys files and instead we'll just rely on the stub-winsys.c to handle these platforms. Since the only thing the platform specific files were providing anyway was a get_proc_address function; it was trivial to simply update the clutter backend code to handle this directly for now.
-rw-r--r--clutter/cogl/cogl/Makefile.am8
-rw-r--r--clutter/cogl/cogl/winsys/cogl-winsys-osx.c35
-rw-r--r--clutter/cogl/cogl/winsys/cogl-winsys-stub.c5
-rw-r--r--clutter/cogl/cogl/winsys/cogl-winsys-win32.c35
-rw-r--r--clutter/cogl/configure.ac6
-rw-r--r--clutter/win32/clutter-backend-win32.c2
6 files changed, 8 insertions, 83 deletions
diff --git a/clutter/cogl/cogl/Makefile.am b/clutter/cogl/cogl/Makefile.am
index 3cee5fad0..c432c3fe2 100644
--- a/clutter/cogl/cogl/Makefile.am
+++ b/clutter/cogl/cogl/Makefile.am
@@ -342,14 +342,8 @@ if SUPPORT_EGL_PLATFORM_GDL
cogl_sources_c += \
$(srcdir)/winsys/cogl-winsys-egl.c
endif
-if SUPPORT_WIN32
+if SUPPORT_STUB
cogl_sources_c += \
- $(srcdir)/winsys/cogl-winsys-win32.c \
- $(srcdir)/winsys/cogl-winsys-stub.c
-endif
-if SUPPORT_OSX
-cogl_sources_c += \
- $(srcdir)/winsys/cogl-winsys-osx.c \
$(srcdir)/winsys/cogl-winsys-stub.c
endif
diff --git a/clutter/cogl/cogl/winsys/cogl-winsys-osx.c b/clutter/cogl/cogl/winsys/cogl-winsys-osx.c
deleted file mode 100644
index 9c937e4bc..000000000
--- a/clutter/cogl/cogl/winsys/cogl-winsys-osx.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Cogl
- *
- * An object oriented GL/GLES Abstraction/Utility Layer
- *
- * Copyright (C) 2007,2008,2009 Intel Corporation.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- *
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "cogl.h"
-
-CoglFuncPtr
-_cogl_winsys_get_proc_address (const char *name)
-{
- return NULL;
-}
-
diff --git a/clutter/cogl/cogl/winsys/cogl-winsys-stub.c b/clutter/cogl/cogl/winsys/cogl-winsys-stub.c
index 576cb5f13..a45cbdf5b 100644
--- a/clutter/cogl/cogl/winsys/cogl-winsys-stub.c
+++ b/clutter/cogl/cogl/winsys/cogl-winsys-stub.c
@@ -32,6 +32,11 @@
* calls into the winsys layer with #ifdef COGL_HAS_FULL_WINSYS
*/
+CoglFuncPtr
+_cogl_winsys_get_proc_address (const char *name)
+{
+ return NULL;
+}
void
_cogl_winsys_onscreen_swap_buffers (CoglOnscreen *onscreen)
diff --git a/clutter/cogl/cogl/winsys/cogl-winsys-win32.c b/clutter/cogl/cogl/winsys/cogl-winsys-win32.c
deleted file mode 100644
index 7088fa42e..000000000
--- a/clutter/cogl/cogl/winsys/cogl-winsys-win32.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Cogl
- *
- * An object oriented GL/GLES Abstraction/Utility Layer
- *
- * Copyright (C) 2007,2008,2009 Intel Corporation.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- *
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "cogl.h"
-
-CoglFuncPtr
-_cogl_winsys_get_proc_address (const char *name)
-{
- return (CoglFuncPtr) wglGetProcAddress ((LPCSTR) name);
-}
-
diff --git a/clutter/cogl/configure.ac b/clutter/cogl/configure.ac
index 304d8b01f..c8006ac54 100644
--- a/clutter/cogl/configure.ac
+++ b/clutter/cogl/configure.ac
@@ -399,6 +399,7 @@ AS_IF([test "x$enable_stub_winsys" = "xyes"],
GL_WINSYS_APIS="$GL_WINSYS_APIS stub"
ALLOW_GLX=no
])
+AM_CONDITIONAL(SUPPORT_STUB, [test "x$enable_stub_winsys" = "xyes"])
AC_ARG_ENABLE(
[glx],
@@ -564,11 +565,6 @@ AM_CONDITIONAL(SUPPORT_XLIB, [test "x$SUPPORT_XLIB" = "xyes"])
AM_CONDITIONAL(COGL_STANDALONE_BUILD, [true])
-AM_CONDITIONAL(SUPPORT_OSX, [false])
-AM_CONDITIONAL(SUPPORT_WIN32, [false])
-AM_CONDITIONAL(SUPPORT_WAYLAND, [false])
-
-
dnl ================================================================
dnl Compiler stuff.
dnl ================================================================
diff --git a/clutter/win32/clutter-backend-win32.c b/clutter/win32/clutter-backend-win32.c
index a5c367fbc..04e469db0 100644
--- a/clutter/win32/clutter-backend-win32.c
+++ b/clutter/win32/clutter-backend-win32.c
@@ -229,7 +229,7 @@ clutter_backend_win32_get_features (ClutterBackend *backend)
CLUTTER_NOTE (BACKEND, "vblank sync: left at default at user request");
else if (cogl_clutter_check_extension ("WGL_EXT_swap_control", extensions)
&& (swap_interval = (SwapIntervalProc)
- cogl_get_proc_address ("wglSwapIntervalEXT")))
+ wglGetProcAddress ((LPCSTR) "wglSwapIntervalEXT")))
{
/* According to the specification for the WGL_EXT_swap_control
extension the default swap interval is 1 anyway, so if no