changed to not require openGL/GVars/pthreads