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

A few GL fixes

This commit is contained in:
Logan McNaughton 2017-02-05 13:27:37 -07:00 committed by Sergey Lipskiy
parent 62f1903a15
commit 5d51242252
3 changed files with 9 additions and 9 deletions

View File

@ -290,10 +290,4 @@ void initGLFunctions()
GL_GET_PROC_ADR(PFNGLCREATEFRAMEBUFFERSPROC, glCreateFramebuffers);
GL_GET_PROC_ADR(PFNGLNAMEDFRAMEBUFFERTEXTUREPROC, glNamedFramebufferTexture);
GL_GET_PROC_ADR(PFNGLDRAWELEMENTSBASEVERTEXPROC, glDrawElementsBaseVertex);
#ifdef EGL
if (g_glBufferStorage == nullptr)
g_glBufferStorage = (PFNGLBUFFERSTORAGEPROC) eglGetProcAddress("glBufferStorageEXT");
if (g_glTexStorage2D == nullptr)
g_glTexStorage2D = (PFNGLTEXSTORAGE2DPROC) eglGetProcAddress("glTexStorage2DEXT");
#endif
}

View File

@ -2,6 +2,9 @@
#include <Config.h>
#include "opengl_Utils.h"
#include "opengl_GLInfo.h"
#ifdef EGL
#include <EGL/egl.h>
#endif
using namespace opengl;
@ -40,9 +43,12 @@ void GLInfo::init() {
}
bufferStorage = (!isGLESX && (numericVersion >= 44)) || Utils::isExtensionSupported(*this, "GL_ARB_buffer_storage") ||
Utils::isExtensionSupported(*this, "GL_EXT_buffer_storage");
#ifdef EGL
if (isGLESX && bufferStorage)
g_glBufferStorage = (PFNGLBUFFERSTORAGEPROC) eglGetProcAddress("glBufferStorageEXT");
#endif
texStorage = (isGLESX && (numericVersion >= 30)) || (!isGLESX && numericVersion >= 42) ||
Utils::isExtensionSupported(*this, "GL_ARB_texture_storage") ||
Utils::isExtensionSupported(*this, "GL_EXT_texture_storage");
Utils::isExtensionSupported(*this, "GL_ARB_texture_storage");
shaderStorage = false;
if (config.generalEmulation.enableShadersStorage != 0) {

View File

@ -8,7 +8,7 @@
using namespace opengl;
bool Utils::isExtensionSupported(const opengl::GLInfo & _glinfo, const char *extension) {
if (!_glinfo.isGLES2 && !_glinfo.majorVersion >= 3) {
if (_glinfo.majorVersion >= 3) {
GLint count = 0;
glGetIntegerv(GL_NUM_EXTENSIONS, &count);
assert(count >= 0);