Dirk,
| Make sure that all libGL.so variants point to the same file, and that
| you have the correct headers for that library (Mesa or nVidia),
| otherwise things become interesting
Yes, I found that the Mesa headers were used for compilation while NVidia's libGL.so was called. I placed NVidia's headers in the appropriate directory and recompiled OpenSG. Furthermore, I reinstalled NVIdia's drivers just to make there was no problem. Now things are in line but the same problem occurs.
I have found that the R version only works if I set OSG_IGNORE_EXTENSIONS to all extensions listed. While I am glad it works, this is odd because the executable finds all extensions and runs fine. Could this have something to do with the way dlopen and dlsym are used in OSGWindow.cpp?
Window::getFunctionByName(const Char8 *s) for linux/sgi/etc.. uses:
libHandle = dlopen(NULL, RTLD_NOW | RTLD_LOCAL);
this causes libHandle to be assigned he handle to the "main program", it is
clear to me what is main in an executable but not in a shared lib. I tested the section
of Window::getFunctionByName that attempts to load the extension function in the R shared
object and found a couple of small problems:
1. no warnings were generated when glXGetProcAddress and glXGetProcAddressARB
failed to load because dlerror should be saved to a variable before written.
The warning appears with the following changes:
if ((error = dlerror()) != NULL) {
FWARNING (("Window::getFunctionByName error locating glXGetProcAddress:
%s\n", error));
This told me that libHandle = dlopen(NULL, RTLD_NOW | RTLD_LOCAL) assigned the
address of the shared lib I made from the OpenSGNav app and thus could not find
the Gl symbols (I am not clear on why since -lGL is linked Wl,-Bdynamic but
will study this more)
2. Window::frameInit() proceeds with _extFunctions.push_back(func) even when
(void*)getFunctionByName(s) returns NULL. This seems intended but causes the
error in my case where the extensions are registered but are not correctly
loaded causing a crash when on of the extensions are called by the scenegraph.
I saw the thread on "Proper use of OpenGL-extensions". Since I can get the extensions from the libraries by explicitly loading them w/ dlopen (e.g. libHandle = dlopen("libGL.so.1", RTLD_NOW | RTLD_LOCAL);) Should I use the Window API to manually insert any desired extensions for windows in the R programs init method?
regards,
Richard
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users