messy prep for conversion to glfw