[cogl/msvc-support: 8/10] Merge branch 'master' into msvc-support
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl/msvc-support: 8/10] Merge branch 'master' into msvc-support
- Date: Thu, 28 Jul 2011 03:46:46 +0000 (UTC)
commit 958038751f108463cd9d4237b1093a41a908af3b
Merge: c022748 d51c3c4
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Thu Jul 28 11:55:02 2011 +0800
Merge branch 'master' into msvc-support
Also update cogl/winsys/cogl-winsys-stub.c to change the CoglWinsysVtable
initialization to be done in a way like what is now done in
cogl/winsys/cogl-winsys-wgl.c (the cogl/winsys/cogl-winsys-stub.c is
built for all builds of COGL, which C99isms must be dealt with for
C89 compilers)
cogl-pango/Makefile.am | 4 +-
cogl/cogl-atlas-texture.c | 76 ++++++++++++++++----------------
cogl/cogl-bitmap-private.h | 11 -----
cogl/cogl-bitmap.c | 12 +++---
cogl/cogl-bitmap.h | 32 ++++++++++++++
cogl/cogl-context.c | 4 +-
cogl/cogl-feature-private.c | 7 ++-
cogl/cogl-feature-private.h | 2 +-
cogl/cogl-fixed.c | 2 +-
cogl/cogl-framebuffer.h | 4 +-
cogl/cogl-glx-renderer-private.h | 3 +
cogl/cogl-pipeline-fragend-arbfp.c | 2 +-
cogl/cogl-quaternion.c | 9 +++-
cogl/cogl-renderer-private.h | 8 +++-
cogl/cogl-renderer.c | 9 ++++
cogl/cogl-sub-texture.c | 12 +++---
cogl/cogl-texture-2d-sliced.c | 82 ++++++++++++++++++------------------
cogl/cogl-texture-private.h | 10 ----
cogl/cogl-texture.c | 36 ++++++++--------
cogl/cogl-texture.h | 35 +++++++++++++++
cogl/cogl.c | 7 +--
cogl/cogl.h | 2 +-
cogl/driver/gl/cogl-gl.c | 5 +-
cogl/driver/gles/cogl-gles.c | 5 +-
cogl/winsys/cogl-winsys-egl.c | 19 ++++++--
cogl/winsys/cogl-winsys-glx.c | 52 +++++------------------
cogl/winsys/cogl-winsys-private.h | 7 +--
cogl/winsys/cogl-winsys-sdl.c | 3 +-
cogl/winsys/cogl-winsys-stub.c | 69 ++++++++++++++++++++----------
cogl/winsys/cogl-winsys-wgl.c | 7 ++-
cogl/winsys/cogl-winsys.c | 29 -------------
31 files changed, 302 insertions(+), 263 deletions(-)
---
diff --cc cogl/cogl.h
index 2bd6674,5def211..ff7f8f4
--- a/cogl/cogl.h
+++ b/cogl/cogl.h
@@@ -93,12 -93,9 +93,12 @@@ typedef struct _CoglFramebuffer CoglFra
#include <cogl/cogl-xlib.h>
#include <cogl/cogl-xlib-renderer.h>
#endif
- #if COGL_HAS_EGL_PLATFORM_WAYLAND_SUPPORT
+ #if defined (COGL_HAS_EGL_PLATFORM_WAYLAND_SUPPORT)
#include <cogl/cogl-wayland-renderer.h>
#endif
+#if COGL_HAS_WIN32_SUPPORT
+#include <cogl/cogl-win32-renderer.h>
+#endif
/* XXX: This will definitly go away once all the Clutter winsys
* code has been migrated down into Cogl! */
#include <cogl/cogl-clutter.h>
diff --cc cogl/winsys/cogl-winsys-stub.c
index 5b3f143,81d8034..ca8097d
--- a/cogl/winsys/cogl-winsys-stub.c
+++ b/cogl/winsys/cogl-winsys-stub.c
@@@ -130,28 -146,29 +146,37 @@@ _cogl_winsys_onscreen_set_visibility (C
{
}
const CoglWinsysVtable *
_cogl_winsys_stub_get_vtable (void)
{
-- return &_cogl_winsys_vtable;
++ static gboolean vtable_inited = FALSE;
++ static CoglWinsysVtable vtable;
++
++ /* It would be nice if we could use C99 struct initializers here
++ like the GLX backend does. However this code is also to be
++ compiled using Visual Studio which (still!) doesn't support them
++ so we initialize it in code instead */
++ if (!vtable_inited)
++ {
++ vtable.id = COGL_WINSYS_ID_STUB;
++ vtable.name = "STUB";
++ vtable.renderer_get_proc_address = _cogl_winsys_renderer_get_proc_address;
++ vtable.renderer_connect = _cogl_winsys_renderer_connect;
++ vtable.renderer_disconnect = _cogl_winsys_renderer_disconnect;
++ vtable.display_setup = _cogl_winsys_display_setup;
++ vtable.display_destroy = _cogl_winsys_display_destroy;
++ vtable.context_init = _cogl_winsys_context_init;
++ vtable.context_deinit = _cogl_winsys_context_deinit;
++ vtable.onscreen_init = _cogl_winsys_onscreen_init;
++ vtable.onscreen_deinit = _cogl_winsys_onscreen_deinit;
++ vtable.onscreen_bind = _cogl_winsys_onscreen_bind;
++ vtable.onscreen_swap_buffers = _cogl_winsys_onscreen_swap_buffers;
++ vtable.onscreen_update_swap_throttled =
++ _cogl_winsys_onscreen_update_swap_throttled;
++ vtable.onscreen_set_visibility = _cogl_winsys_onscreen_set_visibility;
++
++ vtable_inited = TRUE;
++ }
++
++ return &vtable;
}
diff --cc cogl/winsys/cogl-winsys-wgl.c
index 9988506,fac0161..def4d92
--- a/cogl/winsys/cogl-winsys-wgl.c
+++ b/cogl/winsys/cogl-winsys-wgl.c
@@@ -831,9 -832,9 +832,9 @@@ _cogl_winsys_wgl_get_vtable (void
{
memset (&vtable, 0, sizeof (vtable));
- vtable.id = COGL_WINSYS_ID_EGL;
+ vtable.id = COGL_WINSYS_ID_WGL;
vtable.name = "WGL";
- vtable.get_proc_address = _cogl_winsys_get_proc_address;
+ vtable.renderer_get_proc_address = _cogl_winsys_renderer_get_proc_address;
vtable.renderer_connect = _cogl_winsys_renderer_connect;
vtable.renderer_disconnect = _cogl_winsys_renderer_disconnect;
vtable.display_setup = _cogl_winsys_display_setup;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]