#include <GL/gl.h>
#include <stdlib.h>
#include <dlfcn.h>

typedef const GLubyte* (*realglGetString)(GLenum name);

const GLubyte* glGetString(GLenum name) {
    static void* handle = NULL;
    static realglGetString _real = NULL;
    
    switch (name) {
        case GL_VENDOR:
            return (const GLubyte*)"YOUR VENDOR";
        case GL_RENDERER:
            return (const GLubyte*)"SOMETHING";
        case GL_VERSION:
            return (const GLubyte*)"3.1";
        case GL_EXTENSIONS:
            return (const GLubyte*)"BLA BLUB";
        default:
            if (handle == NULL) {
                handle = dlopen("libGL.so.1", RTLD_LAZY);
                _real = dlsym(handle, "glGetString");
            }
            return _real(name);
    }
}