prepare_surface_for_texture now handles a possibility of BGR/ABGR pixel format.