gtkglarea r118 - in trunk: . gtkgl



Author: samh
Date: Wed Feb 18 16:43:17 2009
New Revision: 118
URL: http://svn.gnome.org/viewvc/gtkglarea?rev=118&view=rev

Log:
* gtkgl/gdkgl.c: emit a warning if the GL context could not be shared.

Modified:
   trunk/ChangeLog
   trunk/gtkgl/gdkgl.c

Modified: trunk/gtkgl/gdkgl.c
==============================================================================
--- trunk/gtkgl/gdkgl.c	(original)
+++ trunk/gtkgl/gdkgl.c	Wed Feb 18 16:43:17 2009
@@ -389,17 +389,20 @@
     pf = ChoosePixelFormat (context->hdc, &context->pfd);
 
     if (pf != 0)
-        {
-          SetPixelFormat (context->hdc, pf, &context->pfd);
-          context->hglrc = wglCreateContext (context->hdc);
-        }
+      {
+        SetPixelFormat (context->hdc, pf, &context->pfd);
+        context->hglrc = wglCreateContext (context->hdc);
+      }
 
     if (context->share)
-        {
-          if (context->share->hglrc)
-            wglShareLists (context->share->hglrc, context->hglrc);
-          g_object_unref (context->share);
-        }
+      {
+        if (context->share->hglrc)
+          {
+            if (wglShareLists (context->share->hglrc, context->hglrc) != TRUE)
+                g_warning ("failed sharing context");
+          }
+        g_object_unref (context->share);
+      }
 
     context->initialised = TRUE;
   }
@@ -628,17 +631,20 @@
     pf = ChoosePixelFormat (context->hdc, &context->pfd);
 
     if (pf != 0)
-        {
-          SetPixelFormat (context->hdc, pf, &context->pfd);
-          context->hglrc = wglCreateContext (context->hdc);
-        }
+      {
+        SetPixelFormat (context->hdc, pf, &context->pfd);
+        context->hglrc = wglCreateContext (context->hdc);
+      }
 
     if (context->share)
-        {
-          if (context->share->hglrc)
-            wglShareLists (context->share->hglrc, context->hglrc);
-          gdk_gl_context_unref ((GdkGLContext*)context->share);
-        }
+      {
+        if (context->share->hglrc)
+          {
+            if (wglShareLists (context->share->hglrc, context->hglrc) != TRUE)
+                g_warning ("failed sharing context");
+          }
+        gdk_gl_context_unref ((GdkGLContext*)context->share);
+      }
 
     context->initialised = TRUE;
   }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]