diff options
author | Dan Gudmundsson <[email protected]> | 2011-11-16 15:04:56 +0100 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2011-11-16 15:04:56 +0100 |
commit | 5cd8a13c24cbb9e3c514807b56460bb90a777235 (patch) | |
tree | ada809d14d6670628f502617e34f87b32a9dee97 /lib/wx/c_src | |
parent | f44805dc16feb213f65a65c9a74f1e3125976c2f (diff) | |
download | otp-5cd8a13c24cbb9e3c514807b56460bb90a777235.tar.gz otp-5cd8a13c24cbb9e3c514807b56460bb90a777235.tar.bz2 otp-5cd8a13c24cbb9e3c514807b56460bb90a777235.zip |
[wx] Change libGL loading
Load libGL.so.1 instead of libGL.so, this should fix things when
DL search path is broken (Ubuntu).
dlopen("libGL.so") finds Mesa driver and dlopen("libGL.so.1") finds
Nvidia or ATI. wxWidgets (added by gcc) have a dependency to libGL.so.1
so the context is created with that driver.
Diffstat (limited to 'lib/wx/c_src')
-rw-r--r-- | lib/wx/c_src/egl_impl.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/wx/c_src/egl_impl.cpp b/lib/wx/c_src/egl_impl.cpp index 6d873abc44..1379f07523 100644 --- a/lib/wx/c_src/egl_impl.cpp +++ b/lib/wx/c_src/egl_impl.cpp @@ -70,8 +70,8 @@ typedef char DL_CHAR; # define OPENGL_LIB "/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib" # define OPENGLU_LIB "/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib" # else -# define OPENGL_LIB "libGL.so" -# define OPENGLU_LIB "libGLU.so" +# define OPENGL_LIB "libGL.so.1" +# define OPENGLU_LIB "libGLU.so.1" # endif #endif extern "C" { @@ -121,7 +121,7 @@ int load_gl_functions() { } } } - dlclose(LIBhandle); + // dlclose(LIBhandle); // fprintf(stderr, "OPENGL library is loaded\r\n"); } else { fprintf(stderr, "Could NOT load OpenGL library: %s\r\n", DLName); @@ -150,7 +150,7 @@ int load_gl_functions() { } } } - dlclose(LIBhandle); + // dlclose(LIBhandle); // fprintf(stderr, "GLU library is loaded\r\n"); } else { fprintf(stderr, "Could NOT load OpenGL GLU library: %s\r\n", DLName); @@ -195,7 +195,7 @@ egl_ogla_error(GLenum errorCode) // msg.Printf(wxT("Tesselation error: %d: "), (int)errorCode); // msg += wxString::FromAscii((char *) err); // send_msg("error", &msg); - fprintf(stderr, "Tesselation error: %d\r\n", (int) errorCode); + fprintf(stderr, "Tesselation error: %d: %s\r\n", (int) errorCode, err); } void CALLBACK @@ -250,7 +250,7 @@ int erl_tess_impl(char* buff, ErlDrvPort port, ErlDrvTermData caller) int *vertices; int num_vertices; GLdouble *n; - int n_pos, AP, res; + int n_pos, AP; num_vertices = * (int *) buff; buff += 8; /* Align */ n = (double *) buff; buff += 8*3; @@ -293,7 +293,7 @@ int erl_tess_impl(char* buff, ErlDrvPort port, ErlDrvTermData caller) rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; // Return tuple {list, Bin} rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; // Result tuple - res = driver_send_term(port,caller,rt,AP); + driver_send_term(port,caller,rt,AP); /* fprintf(stderr, "List %d: %d %d %d \r\n", */ /* res, */ /* n_pos, */ |