Added support for other types of buffers and primitives