Przeglądaj źródła

Merge pull request #36276 from Chaosus/fix_texture_base

Fix GDCLASS for Texture2D/TextureLayered
Rémi Verschelde 5 lat temu
rodzic
commit
3527f52d69

+ 1 - 1
doc/classes/Texture2D.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<class name="Texture2D" inherits="Resource" version="4.0">
+<class name="Texture2D" inherits="Texture" version="4.0">
 	<brief_description>
 		Texture for 2D and 3D.
 	</brief_description>

+ 1 - 1
doc/classes/TextureLayered.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<class name="TextureLayered" inherits="Resource" version="4.0">
+<class name="TextureLayered" inherits="Texture" version="4.0">
 	<brief_description>
 		Base class for 3D texture types.
 	</brief_description>

+ 2 - 2
scene/resources/texture.h

@@ -52,7 +52,7 @@ public:
 
 class Texture2D : public Texture {
 
-	GDCLASS(Texture2D, Resource);
+	GDCLASS(Texture2D, Texture);
 	OBJ_SAVE_TYPE(Texture2D); // Saves derived classes with common type so they can be interchanged.
 
 protected:
@@ -350,7 +350,7 @@ public:
 
 class TextureLayered : public Texture {
 
-	GDCLASS(TextureLayered, Resource);
+	GDCLASS(TextureLayered, Texture);
 
 	VS::TextureLayeredType layered_type;