Fix creation of shared_ptr.
Pass Texture2D by reference.
Qualify method as const.