<div dir="ltr">Hi Robert,<div>maybe this helps: <a href="https://dri.freedesktop.org/wiki/glXGetProcAddressNeverReturnsNULL/">glXGetProcAddressNeverReturnsNULL</a> </div><div>The text in the link states that the nvidia libGL does return NULL, but that is evidently not true anymore.</div><div>I get a pointer for s_glXGetProcAddressARB("RandomString") on debian 9.5 / nvidia driver 387.22</div><div><br></div><div>Regards, Laurens.</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Aug 28, 2018 at 10:57 AM Robert Osfield <<a href="mailto:robert.osfield@gmail.com">robert.osfield@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">We are entering a bit of twilight zone.... to<br>
osg::getGLExtensionFuncPtr() I added the follow debug output to the<br>
linux code path:<br>
<br>
static GetProcAddressARBProc s_glXGetProcAddressARB =<br>
convertPointerType<GetProcAddressARBProc, void*>(dlsym(0,<br>
"glXGetProcAddressARB"));<br>
if (s_glXGetProcAddressARB)<br>
{<br>
OSG_NOTICE<<" s_glXGetProcAddressARB("<<funcName<<") =<br>
"<<(s_glXGetProcAddressARB)(funcName)<<std::endl;<br>
OSG_NOTICE<<"<br>
convertPointerType(s_glXGetProcAddressARB("<<funcName<<")) =<br>
"<<convertPointerType<void*,<br>
__GLXextFuncPtr>((s_glXGetProcAddressARB)(funcName))<<std::endl;<br>
OSG_NOTICE<<" dlsym(0, "<<funcName<<") = "<<dlsym(0,<br>
funcName)<<std::endl;<br>
<br>
return convertPointerType<void*,<br>
__GLXextFuncPtr>((s_glXGetProcAddressARB)(funcName));<br>
}<br>
<br>
And the output I get is:<br>
$ osgbindlesstext | grep glGetTexture<br>
s_glXGetProcAddressARB(glGetTextureHandle) = 1<br>
convertPointerType(s_glXGetProcAddressARB(glGetTextureHandle)) =<br>
convertPointerType(0x7fe1e11bf2e0) 0x7fe1e11bf2e0<br>
dlsym(0, glGetTextureHandle) = 0<br>
getGLExtensionFuncPtr(glGetTextureHandle)<br>
s_glXGetProcAddressARB(glGetTextureHandle) = 1<br>
convertPointerType(s_glXGetProcAddressARB(glGetTextureHandle)) =<br>
convertPointerType(0x7fe1e11bf2e0) 0x7fe1e11bf2e0<br>
dlsym(0, glGetTextureHandle) = 0<br>
getGLExtensionFuncPtr(glGetTextureHandleARB)<br>
s_glXGetProcAddressARB(glGetTextureHandleARB) = 1<br>
convertPointerType(s_glXGetProcAddressARB(glGetTextureHandleARB))<br>
= convertPointerType(0x7fe1f27674a0) 0x7fe1f27674a0<br>
dlsym(0, glGetTextureHandleARB) = 0x7fe1f3e7a4a0<br>
getGLExtensionFuncPtr(glGetTextureHandleNV)<br>
s_glXGetProcAddressARB(glGetTextureHandleNV) = 1<br>
convertPointerType(s_glXGetProcAddressARB(glGetTextureHandleNV)) =<br>
convertPointerType(0x7fe1f27674c0) 0x7fe1f27674c0<br>
dlsym(0, glGetTextureHandleNV) = 0x7fe1f3e7a4c0<br>
getGLExtensionFuncPtr(glGetTextureHandleIMG)<br>
s_glXGetProcAddressARB(glGetTextureHandleIMG) = 1<br>
convertPointerType(s_glXGetProcAddressARB(glGetTextureHandleIMG))<br>
= convertPointerType(0x7fe1e11bf380) 0x7fe1e11bf380<br>
dlsym(0, glGetTextureHandleIMG) = 0<br>
getGLExtensionFuncPtr(glGetTextureHandleFrog)<br>
s_glXGetProcAddressARB(glGetTextureHandleFrog) = 1<br>
convertPointerType(s_glXGetProcAddressARB(glGetTextureHandleFrog))<br>
= convertPointerType(0x7fe1e11bf3a0) 0x7fe1e11bf3a0<br>
dlsym(0, glGetTextureHandleFrog) = 0<br>
getGLExtensionFuncPtr(glGetTextureHandleCat)<br>
s_glXGetProcAddressARB(glGetTextureHandleCat) = 1<br>
convertPointerType(s_glXGetProcAddressARB(glGetTextureHandleCat))<br>
= convertPointerType(0x7fe1e11bf3c0) 0x7fe1e11bf3c0<br>
dlsym(0, glGetTextureHandleCat) = 0<br>
<br>
So dlsym is working as expected but the s_glXGetProcAddressARB usage<br>
is problematic when the pointer should be NULL. More digging to do...<br>
<br>
Robert.<br>
_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
</blockquote></div>