convert to c++ because I want GLM :(