[Headless] Workaround texture load failure.

Some assets are loaded based on OS/server feature detection, namely
textures (but potentially others).
The ResourceImporter will fail to load a texture if the OS reports not
supporting it. The OS, in turn, checks texture format support via the
RenderingServer.
This commit makes the dummy rasterizer report known texture formats as
supported (although unused), so that scenes can be correctly loaded when
they include references to imported textures.
This commit is contained in:
Fabio Alessandrelli 2021-12-18 11:27:13 +01:00
parent 9f5045f70f
commit e880294d9f

View file

@ -692,7 +692,9 @@ public:
virtual void update_memory_info() override {}
virtual uint64_t get_rendering_info(RS::RenderingInfo p_info) override { return 0; }
bool has_os_feature(const String &p_feature) const override { return false; }
bool has_os_feature(const String &p_feature) const override {
return p_feature == "rgtc" || p_feature == "bptc" || p_feature == "s3tc" || p_feature == "etc" || p_feature == "etc2";
}
void update_dirty_resources() override {}