implemented proper opengl/glew multithreaded context handling