|
From: tom f. <tf...@al...> - 2009-03-18 06:19:20
|
Owen Kaluza <Owe...@sc...> writes: > This all works fine as as separate solutions but [. . .] if the > OSMesa library is linked but glx used instead it causes the program > to segfault on a call to a non-specific GL function. > > I also discovered that the order of linking effects this behaviour, if > -lOSMesa is specified before -lGL on the compile command line then > OSMesa output works but using GL functions through glx will segfault. > If the order is reversed then it works fine through glx and OSMesa > appears to run ok (no error codes are returned) but none of the graphics > commands produce output to the OSMesa buffer and a blank image results. Can you run ldd on the resulting binary? Seems like you're linking in both Mesa's lib and your system OpenGL lib. This would be consistent with the order of -l options mattering; the linker would stop searching on the first find, and both provide it. See my recent work with respect to GLEW. In a sentence, you want to 1) mangle all of Mesa's symbols, and 2) load all your OpenGL functions at runtime. Details can be found in my posts to their mailing lists, which should be findable with a bit of googling. Cheers, -tom |