1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #ifndef GLLIBRARYLOADER_H_
6 #define GLLIBRARYLOADER_H_
24 bool OpenLibrary(const char *library
);
26 typedef PRFuncPtr (GLAPIENTRY
* PlatformLookupFunction
) (const char *);
30 MAX_SYMBOL_LENGTH
= 128
34 PRFuncPtr
*symPointer
;
35 const char *symNames
[MAX_SYMBOL_NAMES
];
38 bool LoadSymbols(SymLoadStruct
*firstStruct
,
39 bool tryplatform
= false,
40 const char *prefix
= nullptr,
41 bool warnOnFailure
= true);
44 * Static version of the functions in this class
46 static PRFuncPtr
LookupSymbol(PRLibrary
*lib
,
48 PlatformLookupFunction lookupFunction
= nullptr);
49 static bool LoadSymbols(PRLibrary
*lib
,
50 SymLoadStruct
*firstStruct
,
51 PlatformLookupFunction lookupFunction
= nullptr,
52 const char *prefix
= nullptr,
53 bool warnOnFailure
= true);
57 mLookupFunc
= nullptr;
61 PlatformLookupFunction mLookupFunc
;
65 } /* namespace mozilla */
67 #endif /* GLLIBRARYLOADER_H_ */