Created
February 25, 2009 03:44
-
-
Save kig/69984 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# HG changeset patch | |
# User [email protected] | |
# Date 1235529319 -7200 | |
# Node ID aa0e111148a32ba835b9e5f9fe6cd84179068b55 | |
# Parent f050229f6011ec1ea0f7862dc69a7df9827d9dd0 | |
nsGLPbufferGLX.cpp: 64-bit Linux fixes | |
nsGLPbufferGLX::Init(nsCanvasRenderingContextGLPrivate *priv) | |
- Added /usr/lib64 to libGL.so search path | |
- Error messages for all failure cases | |
GLXWrap::Init() | |
- Removed glXQueryClientString from the list of symbols to load | |
as it was not found for some reason | |
diff -r f050229f6011 -r aa0e111148a3 src/nsGLPbufferGLX.cpp | |
--- a/src/nsGLPbufferGLX.cpp Wed Jan 21 16:12:04 2009 -0800 | |
+++ b/src/nsGLPbufferGLX.cpp Wed Feb 25 04:35:19 2009 +0200 | |
@@ -99,7 +99,7 @@ | |
{ (PRFuncPtr*) &fGetFBConfigs, { "glXGetFBConfigs", NULL } }, | |
{ (PRFuncPtr*) &fMakeContextCurrent, { "glXMakeContextCurrent", NULL } }, | |
{ (PRFuncPtr*) &fQueryExtensionsString, { "glXQueryExtensionsString", NULL } }, | |
- { (PRFuncPtr*) &fQueryClientString, { "glXQueryClientString", NULL } }, | |
+// { (PRFuncPtr*) &fQueryClientString, { "glXQueryClientString", NULL } }, | |
{ (PRFuncPtr*) &fQueryServerString, { "glXQueryServerString", NULL } }, | |
{ NULL, { NULL } } | |
}; | |
@@ -122,12 +122,17 @@ | |
nsresult rv; | |
const char *s; | |
- if (!gGLXWrap.OpenLibrary("/usr/lib/libGL.so") && | |
- !gGLXWrap.OpenLibrary("/usr/X11R6/lib/libGL.so")) | |
+ if (!gGLXWrap.OpenLibrary("/usr/lib64/libGL.so") && | |
+ !gGLXWrap.OpenLibrary("/usr/lib/libGL.so") && | |
+ !gGLXWrap.OpenLibrary("/usr/X11R6/lib/libGL.so")) { | |
+ fprintf (stderr, "Couldn't find libGL.so\n"); fflush (stderr); | |
return PR_FALSE; | |
+ } | |
- if (!gGLXWrap.Init()) | |
+ if (!gGLXWrap.Init()) { | |
+ fprintf (stderr, "gGLXWrap.Init() failed\n"); fflush (stderr); | |
return PR_FALSE; | |
+ } | |
mDisplay = XOpenDisplay(NULL); | |
if (!mDisplay) { | |
@@ -137,12 +142,16 @@ | |
// Make sure that everyone agrees that pbuffers are supported | |
s = gGLXWrap.fQueryExtensionsString(mDisplay, DefaultScreen(mDisplay)); | |
- if (strstr(s, "GLX_SGIX_pbuffer") == NULL) | |
+ if (strstr(s, "GLX_SGIX_pbuffer") == NULL) { | |
+ fprintf (stderr, "GLX_SGIX_pbuffer not supported\n"); fflush (stderr); | |
return PR_FALSE; | |
+ } | |
s = gGLXWrap.fQueryServerString(mDisplay, DefaultScreen(mDisplay), GLX_EXTENSIONS); | |
- if (strstr(s, "GLX_SGIX_pbuffer") == NULL) | |
+ if (strstr(s, "GLX_SGIX_pbuffer") == NULL) { | |
+ fprintf (stderr, "GLX_SGIX_pbuffer not supported by server\n"); fflush (stderr); | |
return PR_FALSE; | |
+ } | |
mPriv = priv; | |
@@ -197,7 +206,8 @@ | |
fprintf (stderr, "nsGLPbufferGLX::Init!\n"); | |
- if (!mGLWrap.OpenLibrary("/usr/lib/libGL.so.1")) { | |
+ if (!mGLWrap.OpenLibrary("/usr/lib64/libGL.so.1") && | |
+ !mGLWrap.OpenLibrary("/usr/lib/libGL.so.1")) { | |
LogMessage(NS_LITERAL_CSTRING("Canvas 3D: GLWrap init failed")); | |
return PR_FALSE; | |
} | |
# HG changeset patch | |
# User [email protected] | |
# Date 1235531552 -7200 | |
# Node ID 7d1690410384d0dfd6e9eb656b9f16448c10f02a | |
# Parent aa0e111148a32ba835b9e5f9fe6cd84179068b55 | |
nsGLPbufferOSMesa.cpp: Linux dynlink fix | |
nsGLPbufferOSMESA::Init(nsCanvasRenderingContextGLPrivate *priv) | |
- Changed libOSMesa.so.7 to libOSMesa.so.6, as that's what Mesa uses | |
See: http://www.mesa3d.org/relnotes-7.0.1.html | |
diff -r aa0e111148a3 -r 7d1690410384 src/nsGLPbufferOSMesa.cpp | |
--- a/src/nsGLPbufferOSMesa.cpp Wed Feb 25 04:35:19 2009 +0200 | |
+++ b/src/nsGLPbufferOSMesa.cpp Wed Feb 25 05:12:32 2009 +0200 | |
@@ -111,7 +111,7 @@ | |
rv |= libfile->Append(NS_LITERAL_STRING("libOSMesa.7.dylib")); | |
#elif defined(XP_UNIX) | |
rv |= libfile->Append(NS_LITERAL_STRING("Linux")); | |
- rv |= libfile->Append(NS_LITERAL_STRING("libOSMesa.so.7")); | |
+ rv |= libfile->Append(NS_LITERAL_STRING("libOSMesa.so.6")); | |
#endif | |
fprintf (stderr, "B 0x%08x\n", rv); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment