Bug 732598 - Optionally load glGetTexLevelParameteriv - r=bjacob

This commit is contained in:
Matt Woodrow 2012-03-03 13:12:57 +13:00
parent 12a32ed22c
commit 22950a7371
2 changed files with 5 additions and 1 deletions

View File

@ -253,7 +253,6 @@ GLContext::InitWithPrefix(const char *prefix, bool trygl)
{ (PRFuncPtr*) &mSymbols.fTexParameteri, { "TexParameteri", NULL } },
{ (PRFuncPtr*) &mSymbols.fTexParameterf, { "TexParameterf", NULL } },
{ (PRFuncPtr*) &mSymbols.fGetString, { "GetString", NULL } },
{ (PRFuncPtr*) &mSymbols.fGetTexLevelParameteriv, { "GetTexLevelParameteriv", NULL } },
{ (PRFuncPtr*) &mSymbols.fGetTexParameterfv, { "GetTexParameterfv", NULL } },
{ (PRFuncPtr*) &mSymbols.fGetTexParameteriv, { "GetTexParameteriv", NULL } },
{ (PRFuncPtr*) &mSymbols.fGetUniformfv, { "GetUniformfv", "GetUniformfvARB", NULL } },
@ -499,6 +498,7 @@ GLContext::InitWithPrefix(const char *prefix, bool trygl)
// Load developer symbols, don't fail if we can't find them.
SymLoadStruct auxSymbols[] = {
{ (PRFuncPtr*) &mSymbols.fGetTexImage, { "GetTexImage", NULL } },
{ (PRFuncPtr*) &mSymbols.fGetTexLevelParameteriv, { "GetTexLevelParameteriv", NULL } },
{ NULL, { NULL } },
};
LoadSymbols(&auxSymbols[0], trygl, prefix);

View File

@ -2136,6 +2136,10 @@ public:
void fGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint *params)
{
if (!mSymbols.fGetTexLevelParameteriv) {
*params = 0;
return;
}
BEFORE_GL_CALL;
mSymbols.fGetTexLevelParameteriv(target, level, pname, params);
AFTER_GL_CALL;