Bug 943925 - Fix the loading of the glDrawBuffers symbol - r=jgilbert

This commit is contained in:
Benoit Jacob 2014-01-10 22:14:17 -05:00
Родитель b609afd613
Коммит 7bdb8095bb
1 изменённых файлов: 14 добавлений и 1 удалений

Просмотреть файл

@ -493,7 +493,6 @@ GLContext::InitWithPrefix(const char *prefix, bool trygl)
{ (PRFuncPtr*) &mSymbols.fUnmapBuffer, { "UnmapBuffer", nullptr } },
{ (PRFuncPtr*) &mSymbols.fPointParameterf, { "PointParameterf", nullptr } },
{ (PRFuncPtr*) &mSymbols.fDrawBuffer, { "DrawBuffer", nullptr } },
{ (PRFuncPtr*) &mSymbols.fDrawBuffers, { "DrawBuffers", nullptr } },
{ nullptr, { nullptr } },
};
@ -984,6 +983,20 @@ GLContext::InitWithPrefix(const char *prefix, bool trygl)
}
}
if (IsSupported(GLFeature::draw_buffers)) {
SymLoadStruct drawBuffersSymbols[] = {
{ (PRFuncPtr*) &mSymbols.fDrawBuffers, { "DrawBuffers", nullptr } },
{ nullptr, { nullptr } },
};
if (!LoadSymbols(drawBuffersSymbols, trygl, prefix)) {
NS_ERROR("GL supports draw_buffers without supplying its functions.");
MarkUnsupported(GLFeature::draw_buffers);
mSymbols.fDrawBuffers = nullptr;
}
}
if (IsExtensionSupported(KHR_debug)) {
SymLoadStruct extSymbols[] = {
{ (PRFuncPtr*) &mSymbols.fDebugMessageControl, { "DebugMessageControl", "DebugMessageControlKHR", nullptr } },