freeglut segfault because it receives a __GLcontextModes instead of a GLXFBConfig
Submitted by rix..@..ree.fr
Assigned to mes..@..op.org
Description
glXChooseFBConfig and friends happyly cast one structure to another, so I believe they are supposed to be equal. This is not the case here, as gdb shows it :
type = struct __GLcontextModesRec { struct __GLcontextModesRec *next; GLboolean rgbMode; GLboolean floatMode; GLboolean colorIndexMode; GLuint doubleBufferMode; GLuint stereoMode; GLboolean haveAccumBuffer; GLboolean haveDepthBuffer; GLboolean haveStencilBuffer; GLint redBits; GLint greenBits; GLint blueBits; GLint alphaBits; GLuint redMask; GLuint greenMask; GLuint blueMask; GLuint alphaMask; GLint rgbBits; ...
which comes from GL/internal/glcore.h from MESA, while the other is :
type = struct __GLXFBConfigRec { int visualType; int transparentType; int transparentRed; int transparentGreen; int transparentBlue; int transparentAlpha; int transparentIndex; int visualCaveat; int associatedVisualId; int screen; int drawableType; int renderType; int maxPbufferWidth; int maxPbufferHeight; int maxPbufferPixels; int optimalPbufferWidth; int optimalPbufferHeight; int visualSelectGroup; unsigned int id; ...
This later definition comes not from MESA but aparently from /use/include/GL/glxint.h on my host (which is a gentoo and this file is there installed by a package named glproto BTW).
Version: git