[osg-users] setGLExtensionFuncPtr priority
Voerman, L.
l.voerman at rug.nl
Tue Aug 28 03:59:44 PDT 2018
Hi Robert,
maybe this helps: glXGetProcAddressNeverReturnsNULL
<https://dri.freedesktop.org/wiki/glXGetProcAddressNeverReturnsNULL/>
The text in the link states that the nvidia libGL does return NULL, but
that is evidently not true anymore.
I get a pointer for s_glXGetProcAddressARB("RandomString") on debian 9.5 /
nvidia driver 387.22
Regards, Laurens.
On Tue, Aug 28, 2018 at 10:57 AM Robert Osfield <robert.osfield at gmail.com>
wrote:
> We are entering a bit of twilight zone.... to
> osg::getGLExtensionFuncPtr() I added the follow debug output to the
> linux code path:
>
> static GetProcAddressARBProc s_glXGetProcAddressARB =
> convertPointerType<GetProcAddressARBProc, void*>(dlsym(0,
> "glXGetProcAddressARB"));
> if (s_glXGetProcAddressARB)
> {
> OSG_NOTICE<<" s_glXGetProcAddressARB("<<funcName<<") =
> "<<(s_glXGetProcAddressARB)(funcName)<<std::endl;
> OSG_NOTICE<<"
> convertPointerType(s_glXGetProcAddressARB("<<funcName<<")) =
> "<<convertPointerType<void*,
> __GLXextFuncPtr>((s_glXGetProcAddressARB)(funcName))<<std::endl;
> OSG_NOTICE<<" dlsym(0, "<<funcName<<") = "<<dlsym(0,
> funcName)<<std::endl;
>
> return convertPointerType<void*,
> __GLXextFuncPtr>((s_glXGetProcAddressARB)(funcName));
> }
>
> And the output I get is:
> $ osgbindlesstext | grep glGetTexture
> s_glXGetProcAddressARB(glGetTextureHandle) = 1
> convertPointerType(s_glXGetProcAddressARB(glGetTextureHandle)) =
> convertPointerType(0x7fe1e11bf2e0) 0x7fe1e11bf2e0
> dlsym(0, glGetTextureHandle) = 0
> getGLExtensionFuncPtr(glGetTextureHandle)
> s_glXGetProcAddressARB(glGetTextureHandle) = 1
> convertPointerType(s_glXGetProcAddressARB(glGetTextureHandle)) =
> convertPointerType(0x7fe1e11bf2e0) 0x7fe1e11bf2e0
> dlsym(0, glGetTextureHandle) = 0
> getGLExtensionFuncPtr(glGetTextureHandleARB)
> s_glXGetProcAddressARB(glGetTextureHandleARB) = 1
> convertPointerType(s_glXGetProcAddressARB(glGetTextureHandleARB))
> = convertPointerType(0x7fe1f27674a0) 0x7fe1f27674a0
> dlsym(0, glGetTextureHandleARB) = 0x7fe1f3e7a4a0
> getGLExtensionFuncPtr(glGetTextureHandleNV)
> s_glXGetProcAddressARB(glGetTextureHandleNV) = 1
> convertPointerType(s_glXGetProcAddressARB(glGetTextureHandleNV)) =
> convertPointerType(0x7fe1f27674c0) 0x7fe1f27674c0
> dlsym(0, glGetTextureHandleNV) = 0x7fe1f3e7a4c0
> getGLExtensionFuncPtr(glGetTextureHandleIMG)
> s_glXGetProcAddressARB(glGetTextureHandleIMG) = 1
> convertPointerType(s_glXGetProcAddressARB(glGetTextureHandleIMG))
> = convertPointerType(0x7fe1e11bf380) 0x7fe1e11bf380
> dlsym(0, glGetTextureHandleIMG) = 0
> getGLExtensionFuncPtr(glGetTextureHandleFrog)
> s_glXGetProcAddressARB(glGetTextureHandleFrog) = 1
> convertPointerType(s_glXGetProcAddressARB(glGetTextureHandleFrog))
> = convertPointerType(0x7fe1e11bf3a0) 0x7fe1e11bf3a0
> dlsym(0, glGetTextureHandleFrog) = 0
> getGLExtensionFuncPtr(glGetTextureHandleCat)
> s_glXGetProcAddressARB(glGetTextureHandleCat) = 1
> convertPointerType(s_glXGetProcAddressARB(glGetTextureHandleCat))
> = convertPointerType(0x7fe1e11bf3c0) 0x7fe1e11bf3c0
> dlsym(0, glGetTextureHandleCat) = 0
>
> So dlsym is working as expected but the s_glXGetProcAddressARB usage
> is problematic when the pointer should be NULL. More digging to do...
>
> Robert.
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20180828/8ba913ad/attachment.html>
More information about the osg-users
mailing list