reordered instructions for c89 compatibility

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@28176 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Riccardo Mottola 2009-04-04 10:24:19 +00:00
parent afb33293d1
commit 42abff09f9
3 changed files with 11 additions and 4 deletions

View file

@ -1,3 +1,8 @@
2009-04-04 Riccardo Mottola <rmottola@users.sf.net>
* Source/x11/XGGLFormat.m,
Source/x11/XGGLContext.m: reorder instructions for c89 compatibility
2009-03-28 Fred Kiefer <FredKiefer@gmx.de>
* Source/x11/XWindowBuffer.m (+windowBufferForWindow:depthInfo:):

View file

@ -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 );

View file

@ -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 );