Extracted base class for rendering meshes.