id,summary,reporter,owner,description,type,status,priority,milestone,component,resolution,keywords,cc
171,GL extension loading slightly incorrect on Linux,Philip,,"ogl.cpp does:
{{{
	p##nameARB = NULL;
	if(oglHaveVersion(version))
		*(void**)&p##nameARB = SDL_GL_GetProcAddress(#nameCore);
	if(!p##nameARB) /* use the ARB name if the driver lied about what version it supports */
		*(void**)&p##nameARB = SDL_GL_GetProcAddress(#nameARB);
}}}
But [http://dri.freedesktop.org/wiki/glXGetProcAddressNeverReturnsNULL glXGetProcAddress never returns NULL]. In the case where ""the driver lied about what version it supports"", it will still return a non-NULL function pointer, which will crash when it is called, even if there would have been a valid function pointer when we used the ARB name.

(NVIDIA's OpenGL implementation is different, and does (when I test it) return NULL for functions that it doesn't have. But the xorg-x11 implementation only returns NULL for non-existent glX* functions or for names not starting with ""gl"", and it returns non-NULL for any arbitrary gl[!^X]* name.)

Hopefully it doesn't actually matter for us, since ogl.cpp seems to be the only place where we're testing the NULLness of the function pointers, and since ogl.cpp should still work correctly as long as the driver reports its GL version correctly (which it should). So I don't think there's anything we should actually do, except be aware of the issue.",defect,new,Nice to Have,Backlog,Core engine,,"glext, simple",
