[Cogl] [PATCH 3/3] win32: Minor build fixes for building for win32

Neil Roberts neil at linux.intel.com
Thu Feb 21 07:14:34 PST 2013


This fixes some minor errors and warnings that were preventing Cogl
building with mingw32:

• cogl-framebuffer-gl.c was not including cogl-texture-private.h.
  Presumably something else ends up including that when building for
  GLX.

• The WGL winsys was not including cogl-error-private.h

• A call to strsplit in the WGL winsys was wrong.

• For some reason the test-wrap-rectangle-textures test was trying to
  include the GDKPixbuf header.
---
 cogl/driver/gl/cogl-framebuffer-gl.c         |  1 +
 cogl/winsys/cogl-winsys-wgl.c                | 12 ++++++------
 tests/conform/test-wrap-rectangle-textures.c |  1 -
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/cogl/driver/gl/cogl-framebuffer-gl.c b/cogl/driver/gl/cogl-framebuffer-gl.c
index 12eed43..18c9371 100644
--- a/cogl/driver/gl/cogl-framebuffer-gl.c
+++ b/cogl/driver/gl/cogl-framebuffer-gl.c
@@ -33,6 +33,7 @@
 #include "cogl-buffer-gl-private.h"
 #include "cogl-error-private.h"
 #include "cogl-texture-gl-private.h"
+#include "cogl-texture-private.h"
 
 #include <glib.h>
 #include <string.h>
diff --git a/cogl/winsys/cogl-winsys-wgl.c b/cogl/winsys/cogl-winsys-wgl.c
index e6686d8..33e7ad2 100644
--- a/cogl/winsys/cogl-winsys-wgl.c
+++ b/cogl/winsys/cogl-winsys-wgl.c
@@ -45,6 +45,7 @@
 #include "cogl-feature-private.h"
 #include "cogl-win32-renderer.h"
 #include "cogl-winsys-wgl-private.h"
+#include "cogl-error-private.h"
 
 typedef struct _CoglRendererWgl
 {
@@ -416,8 +417,8 @@ create_window_class (CoglDisplay *display, CoglError **error)
   if (wgl_display->window_class == 0)
     {
       _cogl_set_error (error, COGL_WINSYS_ERROR,
-                   COGL_WINSYS_ERROR_CREATE_CONTEXT,
-                   "Unable to register window class");
+                       COGL_WINSYS_ERROR_CREATE_CONTEXT,
+                       "Unable to register window class");
       return FALSE;
     }
 
@@ -617,7 +618,8 @@ update_winsys_features (CoglContext *context, CoglError **error)
 
   if (wgl_extensions)
     {
-      char **split_extensions = g_strsplit (wgl_extensions);
+      char **split_extensions =
+        g_strsplit (wgl_extensions, " ", 0 /* max_tokens */);
 
       COGL_NOTE (WINSYS, "  WGL Extensions: %s", wgl_extensions);
 
@@ -644,9 +646,7 @@ update_winsys_features (CoglContext *context, CoglError **error)
 static CoglBool
 _cogl_winsys_context_init (CoglContext *context, CoglError **error)
 {
-  CoglContextWgl *wgl_context;
-
-  wgl_context = context->winsys = g_new0 (CoglContextWgl, 1);
+  context->winsys = g_new0 (CoglContextWgl, 1);
 
   cogl_win32_renderer_add_filter (context->display->renderer,
                                   win32_event_filter_cb,
diff --git a/tests/conform/test-wrap-rectangle-textures.c b/tests/conform/test-wrap-rectangle-textures.c
index 7fee765..bb8bf69 100644
--- a/tests/conform/test-wrap-rectangle-textures.c
+++ b/tests/conform/test-wrap-rectangle-textures.c
@@ -1,5 +1,4 @@
 #include <cogl/cogl.h>
-#include <gdk-pixbuf/gdk-pixbuf.h>
 
 #include <string.h>
 
-- 
1.7.11.3.g3c3efa5



More information about the Cogl mailing list