cleaned up resource buf interface

Used some templating to remove need for redundant material_buff.