Make managing textures and setting graphics API states explicit