OpenGL support more transparent and can compile shared lib on linux

Other than setting up a structure, before initializing, now there's no need to do anything to use OpenGL