From: Bruce S. <Bru...@nc...> - 2011-12-08 05:30:03
|
Yes, I think you're right. I was going around in circles on the issue of getting a pointer to the function when, as you say, apparently that's needed only on Windows. Apparently the VPython code needs to be refactored slightly to not ask for the pointer if on Linux, since for some reason that no longer works, needed or not. Note that the Mac code in Visual is this (and notice the comments): #include <dlfcn.h> display::EXTENSION_FUNCTION display::getProcAddress(const char* name) { void *lib = dlopen( (const char *)0L, RTLD_LAZY | RTLD_GLOBAL ); void *sym = dlsym( lib, name ); dlclose( lib ); return (EXTENSION_FUNCTION)sym; //return (EXTENSION_FUNCTION)::wglGetProcAddress( name ); // Windows //return (EXTENSION_FUNCTION)Gdk::GL::get_proc_address( name ); // GTK2 } Bruce Sherwood On Wed, Dec 7, 2011 at 8:23 PM, Kevin Karplus <ka...@so...> wrote: > > I retract my previous question. It seems that Microsoft implemented > OpenGL in a weird way, so that on Windows systems you need > wglGetProcAddress and other awkward workarounds. > > It looks like all the code that need the addresses is Windows-specific > and should be isolated to parts of the code only compiled for Windows systems. > > (info from further down on the > http://www.opengl.org/resources/features/OGLextensions/ > page I mentioned in the retracted message.) > |