mirror of
https://github.com/gnustep/libs-back.git
synced 2025-02-23 20:01:22 +00:00
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:
parent
afb33293d1
commit
42abff09f9
3 changed files with 11 additions and 4 deletions
|
@ -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>
|
2009-03-28 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
* Source/x11/XWindowBuffer.m (+windowBufferForWindow:depthInfo:):
|
* Source/x11/XWindowBuffer.m (+windowBufferForWindow:depthInfo:):
|
||||||
|
|
|
@ -283,6 +283,7 @@ static XGGLContext *currentGLContext;
|
||||||
- (void)copyAttributesFromContext:(NSOpenGLContext *)context
|
- (void)copyAttributesFromContext:(NSOpenGLContext *)context
|
||||||
withMask:(unsigned long)mask
|
withMask:(unsigned long)mask
|
||||||
{
|
{
|
||||||
|
GLint error;
|
||||||
MAKE_DISPLAY(dpy);
|
MAKE_DISPLAY(dpy);
|
||||||
|
|
||||||
if (context == nil || ![context isKindOfClass: [XGGLContext class]])
|
if (context == nil || ![context isKindOfClass: [XGGLContext class]])
|
||||||
|
@ -292,7 +293,7 @@ static XGGLContext *currentGLContext;
|
||||||
glXCopyContext(dpy, ((XGGLContext *)context)->glx_context,
|
glXCopyContext(dpy, ((XGGLContext *)context)->glx_context,
|
||||||
glx_context, mask);
|
glx_context, mask);
|
||||||
|
|
||||||
GLint error = glGetError();
|
error = glGetError();
|
||||||
if ( error != GL_NO_ERROR )
|
if ( error != GL_NO_ERROR )
|
||||||
NSDebugMLLog( @"GLX", @"Can not copy GL context %@ from context %@ - Errror %u",
|
NSDebugMLLog( @"GLX", @"Can not copy GL context %@ from context %@ - Errror %u",
|
||||||
self, context, error );
|
self, context, error );
|
||||||
|
|
|
@ -51,8 +51,8 @@
|
||||||
forAttribute: (NSOpenGLPixelFormatAttribute)attrib
|
forAttribute: (NSOpenGLPixelFormatAttribute)attrib
|
||||||
forVirtualScreen: (GLint)screen
|
forVirtualScreen: (GLint)screen
|
||||||
{
|
{
|
||||||
MAKE_DISPLAY(dpy);
|
|
||||||
GLint error;
|
GLint error;
|
||||||
|
MAKE_DISPLAY(dpy);
|
||||||
|
|
||||||
NSAssert(((GSglxMinorVersion (dpy) >= 3) ? (void *)configurations.fbconfig : (void *)configurations.visualinfo) != NULL
|
NSAssert(((GSglxMinorVersion (dpy) >= 3) ? (void *)configurations.fbconfig : (void *)configurations.visualinfo) != NULL
|
||||||
&& configurationCount > 0,
|
&& configurationCount > 0,
|
||||||
|
@ -82,8 +82,8 @@
|
||||||
int AccumSize;
|
int AccumSize;
|
||||||
NSOpenGLPixelFormatAttribute *ptr = attribs;
|
NSOpenGLPixelFormatAttribute *ptr = attribs;
|
||||||
NSMutableData *data = [NSMutableData data];
|
NSMutableData *data = [NSMutableData data];
|
||||||
MAKE_DISPLAY(dpy);
|
|
||||||
GLint drawable_type = 0;
|
GLint drawable_type = 0;
|
||||||
|
MAKE_DISPLAY(dpy);
|
||||||
|
|
||||||
#define append(a, b) do {int v1 = a; int v2 = b; [data appendBytes: &v1 length: sizeof(v1)];\
|
#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)
|
[data appendBytes: &v2 length: sizeof(v2)];} while (0)
|
||||||
|
@ -303,6 +303,7 @@
|
||||||
|
|
||||||
- (GLXWindow) drawableForWindow: (Window)xwindowid
|
- (GLXWindow) drawableForWindow: (Window)xwindowid
|
||||||
{
|
{
|
||||||
|
GLint error;
|
||||||
GLXWindow win;
|
GLXWindow win;
|
||||||
MAKE_DISPLAY(dpy);
|
MAKE_DISPLAY(dpy);
|
||||||
|
|
||||||
|
@ -316,7 +317,7 @@
|
||||||
win = xwindowid;
|
win = xwindowid;
|
||||||
}
|
}
|
||||||
|
|
||||||
GLint error = glGetError();
|
error = glGetError();
|
||||||
if ( error != GL_NO_ERROR )
|
if ( error != GL_NO_ERROR )
|
||||||
NSDebugMLLog( @"GLX", @"Can not create GL window for pixel format %@ - Errror %u",
|
NSDebugMLLog( @"GLX", @"Can not create GL window for pixel format %@ - Errror %u",
|
||||||
self, error );
|
self, error );
|
||||||
|
|
Loading…
Reference in a new issue