1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-04 10:03:36 +00:00

Fix a few GL errors

Check for ARB_buffer_storage instead of the function pointers

Image Textures also require ARB_compute_shader, which provides glMemoryBarrier
This commit is contained in:
Logan McNaughton 2017-01-31 12:39:11 -08:00
parent 9cf7d6e777
commit c074a6cdec
2 changed files with 2 additions and 2 deletions

View File

@ -274,7 +274,7 @@ graphics::ColorBufferReader * ContextImpl::createColorBufferReader(CachedTexture
return new ColorBufferReaderWithEGLImage(_pTexture, m_cachedFunctions->getCachedBindTexture());
#endif*/
if (glBufferStorage != nullptr && glMemoryBarrier != nullptr)
if (Utils::isExtensionSupported("GL_ARB_buffer_storage"))
return new ColorBufferReaderWithBufferStorage(_pTexture, m_cachedFunctions->getCachedBindBuffer());
return new ColorBufferReaderWithPixelBuffer(_pTexture, m_cachedFunctions->getCachedBindBuffer());

View File

@ -34,7 +34,7 @@ void GLInfo::init() {
imageTextures = (majorVersion * 10 + minorVersion >= 31) && (glBindImageTexture != nullptr);
msaa = majorVersion * 10 + minorVersion >= 31;
} else {
imageTextures = ((majorVersion * 10 + minorVersion >= 43) || Utils::isExtensionSupported("GL_ARB_shader_image_load_store")) && (glBindImageTexture != nullptr);
imageTextures = ((majorVersion * 10 + minorVersion >= 43) || (Utils::isExtensionSupported("GL_ARB_shader_image_load_store") && Utils::isExtensionSupported("GL_ARB_compute_shader"))) && (glBindImageTexture != nullptr);
msaa = true;
}