diff --git a/ChangeLog b/ChangeLog index db29b89..16e8fa7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-04-04 Riccardo Mottola + + * Source/x11/XGGLFormat.m, + Source/x11/XGGLContext.m: reorder instructions for c89 compatibility + 2009-03-28 Fred Kiefer * Source/x11/XWindowBuffer.m (+windowBufferForWindow:depthInfo:): diff --git a/Source/x11/XGGLContext.m b/Source/x11/XGGLContext.m index b4dde7d..011edc5 100644 --- a/Source/x11/XGGLContext.m +++ b/Source/x11/XGGLContext.m @@ -283,6 +283,7 @@ static XGGLContext *currentGLContext; - (void)copyAttributesFromContext:(NSOpenGLContext *)context withMask:(unsigned long)mask { + GLint error; MAKE_DISPLAY(dpy); if (context == nil || ![context isKindOfClass: [XGGLContext class]]) @@ -292,7 +293,7 @@ static XGGLContext *currentGLContext; glXCopyContext(dpy, ((XGGLContext *)context)->glx_context, glx_context, mask); - GLint error = glGetError(); + error = glGetError(); if ( error != GL_NO_ERROR ) NSDebugMLLog( @"GLX", @"Can not copy GL context %@ from context %@ - Errror %u", self, context, error ); diff --git a/Source/x11/XGGLFormat.m b/Source/x11/XGGLFormat.m index 616a7f9..7b85d37 100644 --- a/Source/x11/XGGLFormat.m +++ b/Source/x11/XGGLFormat.m @@ -51,8 +51,8 @@ forAttribute: (NSOpenGLPixelFormatAttribute)attrib forVirtualScreen: (GLint)screen { - MAKE_DISPLAY(dpy); GLint error; + MAKE_DISPLAY(dpy); NSAssert(((GSglxMinorVersion (dpy) >= 3) ? (void *)configurations.fbconfig : (void *)configurations.visualinfo) != NULL && configurationCount > 0, @@ -82,8 +82,8 @@ int AccumSize; NSOpenGLPixelFormatAttribute *ptr = attribs; NSMutableData *data = [NSMutableData data]; - MAKE_DISPLAY(dpy); GLint drawable_type = 0; + MAKE_DISPLAY(dpy); #define append(a, b) do {int v1 = a; int v2 = b; [data appendBytes: &v1 length: sizeof(v1)];\ [data appendBytes: &v2 length: sizeof(v2)];} while (0) @@ -303,6 +303,7 @@ - (GLXWindow) drawableForWindow: (Window)xwindowid { + GLint error; GLXWindow win; MAKE_DISPLAY(dpy); @@ -316,7 +317,7 @@ win = xwindowid; } - GLint error = glGetError(); + error = glGetError(); if ( error != GL_NO_ERROR ) NSDebugMLLog( @"GLX", @"Can not create GL window for pixel format %@ - Errror %u", self, error );