From: Mikko Rasa Date: Tue, 19 Oct 2021 09:12:02 +0000 (+0300) Subject: Add Renderable as base class for relevant types in Resources X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=508475b76a5e8fbdd51f57d6587bbf9a2999682b;p=libs%2Fgl.git Add Renderable as base class for relevant types in Resources --- diff --git a/source/resources/resources.cpp b/source/resources/resources.cpp index a37496b9..a0ee5e85 100644 --- a/source/resources/resources.cpp +++ b/source/resources/resources.cpp @@ -64,10 +64,10 @@ Resources::Resources(bool set_as_global): .notify(&set_debug_name); add_type().suffix(".glsl").suffix(".spv") .creator([this](const string &n){ return create_module(n); }); - add_type().keyword("object"); - add_type().base().suffix(".scene") + add_type().base().keyword("object"); + add_type().base().base().suffix(".scene") .creator([this](const string &n) -> OccludedScene * { create_generic(n); return 0; }); - add_type().base().suffix(".scene") + add_type().base().base().suffix(".scene") .creator([this](const string &n) -> OrderedScene * { create_generic(n); return 0; }); add_type().base().suffix(".mat") .creator([this](const string &n) -> PbrMaterial * { create_generic(n); return 0; }) @@ -81,7 +81,7 @@ Resources::Resources(bool set_as_global): .notify(&set_debug_name); add_type().suffix(".samp").keyword("sampler") .notify(&set_debug_name); - add_type().base().suffix(".scene") + add_type().base().base().suffix(".scene") .creator([this](const string &n) -> SimpleScene * { create_generic(n); return 0; }); add_type().suffix(".tech").keyword("technique") .notify(&set_debug_name); @@ -103,7 +103,7 @@ Resources::Resources(bool set_as_global): add_type().base().suffix(".mat") .creator([this](const string &n) -> UnlitMaterial * { create_generic(n); return 0; }) .notify(&set_debug_name); - add_type().base().suffix(".scene") + add_type().base().base().suffix(".scene") .creator([this](const string &n) -> ZSortedScene * { create_generic(n); return 0; }); add_source(get_builtins());