void _loadTextures(void* arg) { TextureManager* that = (TextureManager*) arg; that->loadTextures(); threadMainLoop = false; }