d3drm: Make it possible to create material objects with CreateObject().