зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1344433 - Allow GLX 1.3+glXGetProcAddressARB. - r=jrmuizel
MozReview-Commit-ID: IpjF3HXgcLy
This commit is contained in:
Родитель
26144d40c6
Коммит
49450a2691
|
@ -111,23 +111,43 @@ GLXLibrary::EnsureInitialized()
|
||||||
SYMBOL(GetCurrentContext),
|
SYMBOL(GetCurrentContext),
|
||||||
SYMBOL(WaitGL),
|
SYMBOL(WaitGL),
|
||||||
SYMBOL(WaitX),
|
SYMBOL(WaitX),
|
||||||
|
|
||||||
/* functions introduced in GLX 1.1 */
|
/* functions introduced in GLX 1.1 */
|
||||||
SYMBOL(QueryExtensionsString),
|
SYMBOL(QueryExtensionsString),
|
||||||
SYMBOL(GetClientString),
|
SYMBOL(GetClientString),
|
||||||
SYMBOL(QueryServerString),
|
SYMBOL(QueryServerString),
|
||||||
|
|
||||||
/* functions introduced in GLX 1.3 */
|
/* functions introduced in GLX 1.3 */
|
||||||
SYMBOL(ChooseFBConfig),
|
SYMBOL(ChooseFBConfig),
|
||||||
SYMBOL(GetFBConfigAttrib),
|
SYMBOL(GetFBConfigAttrib),
|
||||||
// WARNING: xGetFBConfigs not set in symbols13_ext
|
|
||||||
SYMBOL(GetFBConfigs),
|
SYMBOL(GetFBConfigs),
|
||||||
// WARNING: symbols13_ext sets xCreateGLXPixmapWithConfig instead
|
|
||||||
SYMBOL(CreatePixmap),
|
SYMBOL(CreatePixmap),
|
||||||
SYMBOL(DestroyPixmap),
|
SYMBOL(DestroyPixmap),
|
||||||
SYMBOL(CreateNewContext),
|
SYMBOL(CreateNewContext),
|
||||||
/* functions introduced in GLX 1.4 */
|
|
||||||
SYMBOL(GetProcAddress),
|
// Core in GLX 1.4, ARB extension before.
|
||||||
|
{ (PRFuncPtr*)&mSymbols.fGetProcAddress, { "glXGetProcAddress",
|
||||||
|
"glXGetProcAddressARB",
|
||||||
|
nullptr } },
|
||||||
END_OF_SYMBOLS
|
END_OF_SYMBOLS
|
||||||
};
|
};
|
||||||
|
if (!GLLibraryLoader::LoadSymbols(mOGLLibrary, symbols)) {
|
||||||
|
NS_WARNING("Couldn't load required GLX symbols.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
Display* display = DefaultXDisplay();
|
||||||
|
int screen = DefaultScreen(display);
|
||||||
|
|
||||||
|
{
|
||||||
|
int major, minor;
|
||||||
|
if (!fQueryVersion(display, &major, &minor) ||
|
||||||
|
major != 1 || minor < 3)
|
||||||
|
{
|
||||||
|
NS_ERROR("GLX version older than 1.3. (released in 1998)");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const GLLibraryLoader::SymLoadStruct symbols_texturefrompixmap[] = {
|
const GLLibraryLoader::SymLoadStruct symbols_texturefrompixmap[] = {
|
||||||
SYMBOL(BindTexImageEXT),
|
SYMBOL(BindTexImageEXT),
|
||||||
|
@ -151,24 +171,6 @@ GLXLibrary::EnsureInitialized()
|
||||||
END_OF_SYMBOLS
|
END_OF_SYMBOLS
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!GLLibraryLoader::LoadSymbols(mOGLLibrary, symbols)) {
|
|
||||||
NS_WARNING("Couldn't find required entry point in OpenGL shared library");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
Display* display = DefaultXDisplay();
|
|
||||||
int screen = DefaultScreen(display);
|
|
||||||
|
|
||||||
{
|
|
||||||
int major, minor;
|
|
||||||
if (!fQueryVersion(display, &major, &minor) ||
|
|
||||||
major != 1 || minor < 4)
|
|
||||||
{
|
|
||||||
NS_ERROR("GLX version older than 1.4. (released in 2005)");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const auto lookupFunction =
|
const auto lookupFunction =
|
||||||
(GLLibraryLoader::PlatformLookupFunction)mSymbols.fGetProcAddress;
|
(GLLibraryLoader::PlatformLookupFunction)mSymbols.fGetProcAddress;
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче