- add_type<Program>().keyword("shader").creator(&Resources::create_program);
- add_type<Sampler>().suffix(".samp").keyword("sampler");
- add_type<Scene>().suffix(".scene").creator(&Resources::create_scene);
- add_type<Technique>().suffix(".tech").keyword("technique");
- add_type<Texture1D>().base<Texture>().suffix(".tex1d").keyword("texture1d");
- add_type<Texture2D>().base<Texture>().suffix(".tex2d").suffix(".png").suffix(".jpg").keyword("texture2d").creator(&Resources::create_texture2d);
- add_type<Texture3D>().base<Texture>().suffix(".tex3d").keyword("texture3d");
- add_type<TextureCube>().base<Texture>().suffix(".texcb").keyword("texture_cube");
- add_type<Texture2DArray>().base<Texture>().suffix(".tex2da").keyword("texture2d_array");
+ add_type<Program>().keyword("shader")
+ .creator([this](const string &n){ return create_program(n); })
+ .notify(&set_debug_name<Program>);
+ add_type<Sampler>().suffix(".samp").keyword("sampler")
+ .notify(&set_debug_name<Sampler>);
+ add_type<SimpleScene>().base<Scene>().suffix(".scene")
+ .creator([this](const string &n) -> SimpleScene * { create_generic<Scene>(n); return 0; });
+ add_type<Technique>().suffix(".tech").keyword("technique")
+ .notify(&set_debug_name<Technique>);
+ add_type<Texture1D>().base<Texture>().suffix(".tex")
+ .creator([this](const string &n) -> Texture1D * { create_texture(n); return 0; })
+ .notify(&set_debug_name<Texture1D>);
+ add_type<Texture2D>().base<Texture>().suffix(".tex").suffix(".png").suffix(".jpg")
+ .creator([this](const string &n) -> Texture2D * { create_texture(n); return 0; })
+ .notify(&set_debug_name<Texture2D>);
+ add_type<Texture3D>().base<Texture>().suffix(".tex")
+ .creator([this](const string &n) -> Texture3D * { create_texture(n); return 0; })
+ .notify(&set_debug_name<Texture3D>);
+ add_type<TextureCube>().base<Texture>().suffix(".tex")
+ .creator([this](const string &n) -> TextureCube * { create_texture(n); return 0; })
+ .notify(&set_debug_name<TextureCube>);
+ add_type<Texture2DArray>().base<Texture>().suffix(".tex")
+ .creator([this](const string &n) -> Texture2DArray * { create_texture(n); return 0; })
+ .notify(&set_debug_name<Texture2DArray>);
+ add_type<UnlitMaterial>().base<Material>().suffix(".mat")
+ .creator([this](const string &n) -> UnlitMaterial * { create_generic<Material>(n); return 0; })
+ .notify(&set_debug_name<Material>);
+ add_type<ZSortedScene>().base<Scene>().suffix(".scene")
+ .creator([this](const string &n) -> ZSortedScene * { create_generic<Scene>(n); return 0; });