Forráskód Böngészése

[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.
Fabio Alessandrelli 3 éve
szülő
commit
e880294d9f
1 módosított fájl, 3 hozzáadás és 1 törlés
  1. 3 1
      servers/rendering/rasterizer_dummy.h

+ 3 - 1
servers/rendering/rasterizer_dummy.h

@@ -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 {}