Replace GLEW with a glLoadGen loader.

This should fix the GL loading errors that occur in some drivers due to
the use of deprecated functions by GLEW. Side benefits are more accurate
auto-completion (deprecated function and symbols don't exist) and faster
pointer loading (less entrypoints to load). In addition it removes an
external library depency, simplifying the build system a bit and
eliminating one set of binary libraries for Windows.
This commit is contained in:
Yuri Kunde Schlesner 2014-08-23 21:00:08 -03:00
parent 76372feb19
commit 478289140d
42 changed files with 2829 additions and 21329 deletions

View file

@ -0,0 +1,5 @@
These file were generated by the [glLoadGen](https://bitbucket.org/alfonse/glloadgen/wiki/Home) OpenGL loader generator and have been checked in as-is. You can re-generate them using version 2.0.2 of glLoadGen and executing the following command:
```
lua LoadGen.lua -version 3.2 -profile core -indent space 3_2_core
```

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -4,7 +4,7 @@
#pragma once
#include <GL/glew.h>
#include "generated/gl_3_2_core.h"
namespace ShaderUtil {

View file

@ -247,10 +247,9 @@ void RendererOpenGL::SetWindow(EmuWindow* window) {
void RendererOpenGL::Init() {
render_window->MakeCurrent();
GLenum err = glewInit();
if (GLEW_OK != err) {
ERROR_LOG(RENDER, "Failed to initialize GLEW! Error message: \"%s\". Exiting...",
glewGetErrorString(err));
int err = ogl_LoadFunctions();
if (ogl_LOAD_SUCCEEDED != err) {
ERROR_LOG(RENDER, "Failed to initialize GL functions! Exiting...");
exit(-1);
}
@ -265,7 +264,6 @@ void RendererOpenGL::Init() {
// Initialize everything else
// --------------------------
InitFramebuffer();
NOTICE_LOG(RENDER, "GL_VERSION: %s\n", glGetString(GL_VERSION));

View file

@ -4,7 +4,7 @@
#pragma once
#include <GL/glew.h>
#include "generated/gl_3_2_core.h"
#include "common/common.h"
#include "common/emu_window.h"