[osg-users] setGLExtensionFuncPtr priority
Robert Osfield
robert.osfield at gmail.com
Tue Aug 28 01:56:46 PDT 2018
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.
More information about the osg-users
mailing list