finished fixing the engine for osX/ogl4