Re: OpenGL sample code on Linux

2009-01-19 Thread Thomas Gamper
Hi! I think the NSOpenGLContext/XGGLContext breakage is my fault. I'll look into it. TOM Clemens Arth schrieb: Fred Kiefer wrote: Clemens Arth wrote: I've tried to implement the OpenGL example in Aaron Hillegass' Cocoa Programming book (chapter 33) in gnustep. Unfortunately I couldn't

Re: OpenGL sample code on Linux

2009-01-19 Thread Fred Kiefer
Thomas Gamper wrote: I think the NSOpenGLContext/XGGLContext breakage is my fault. I'll look into it. Sure, have a look, but after your patch things worked fine for me. Most likely it really is the visual that we are selecting wrongly. Fred ___

Re: OpenGL sample code on Linux

2009-01-19 Thread Fred Kiefer
I hacked bestContext() in back/Source/x11/context.c to return False and with that both examples work again. This looks like the problem has to do with the visual, drawable or depth selection. On my machine glXChooseFBConfig() finds 18 usable configurations, but the code sticks to the first one.

Re: OpenGL sample code on Linux

2009-01-19 Thread Thomas Gamper
Hi! for (i=numvis-1, best = -1; i=0; i--) { if (vinfo[i].depth == 24) best = i; else if (vinfo[i].depth24 best0) best = i; } Try to replace 24 with 32. Since an OpenGL Pixelformat without alpha channel basically makes no sense. TOM Fred Kiefer schrieb: I hacked bestContext() in

Re: OpenGL sample code on Linux

2009-01-19 Thread Fred Kiefer
I don't think that this code in context.c is the problem here. Just before those line we try to get a 32 bit visual, when XRENDER is defined, which is the case on my machine. It is rather the other way round, the gl code uses the first visual and that has a lower depth. Thomas Gamper wrote: for

OpenGL sample code on Linux

2009-01-18 Thread Clemens Arth
Hi, I've tried to implement the OpenGL example in Aaron Hillegass' Cocoa Programming book (chapter 33) in gnustep. Unfortunately I couldn't get it to work - the window doesn't show anything. Can someone provide me with a small simple OpenGL example in gnustep? I couldn't find anything

Re: OpenGL sample code on Linux

2009-01-18 Thread Fred Kiefer
Clemens Arth wrote: I've tried to implement the OpenGL example in Aaron Hillegass' Cocoa Programming book (chapter 33) in gnustep. Unfortunately I couldn't get it to work - the window doesn't show anything. Can someone provide me with a small simple OpenGL example in gnustep? I couldn't