OPENGL: Resolve OpenGL functions on run-time.
Formerly we relied on static linkage. However, in the presense of modern OpenGL (ES) implementations it is not easily identifable which library to link against. For example, on Linux amd64 with nVidia drivers and SDL2 setup to create a GLES 1.1 context one would need to link against libGL.so. However, traditionally GLES 1.1 required to link against libGLESv1_CM.so. To prevent a huge mess we simply resolve the OpenGL functions on run-time now and stop linking against a static library (in most cases). GLES support needs to be enabled manually on configure time for now. Tizen changes have NOT been tested.
This commit is contained in:
parent
b3b3d37e3b
commit
4a781737c1
13 changed files with 419 additions and 202 deletions
|
@ -54,7 +54,7 @@ Common::String getGLErrStr(GLenum error) {
|
|||
void checkGLError(const char *expr, const char *file, int line) {
|
||||
GLenum error;
|
||||
|
||||
while ((error = glGetError()) != GL_NO_ERROR) {
|
||||
while ((error = g_context.glGetError()) != GL_NO_ERROR) {
|
||||
// We cannot use error here because we do not know whether we have a
|
||||
// working screen or not.
|
||||
warning("GL ERROR: %s on %s (%s:%d)", getGLErrStr(error).c_str(), expr, file, line);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue