class_compressedtexturelayered.rst 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/CompressedTextureLayered.xml.
  6. .. _class_CompressedTextureLayered:
  7. CompressedTextureLayered
  8. ========================
  9. **Inherits:** :ref:`TextureLayered<class_TextureLayered>` **<** :ref:`Texture<class_Texture>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. **Inherited By:** :ref:`CompressedCubemap<class_CompressedCubemap>`, :ref:`CompressedCubemapArray<class_CompressedCubemapArray>`, :ref:`CompressedTexture2DArray<class_CompressedTexture2DArray>`
  11. Base class for texture arrays that can optionally be compressed.
  12. .. rst-class:: classref-introduction-group
  13. Description
  14. -----------
  15. A texture array that is loaded from a ``.ctexarray`` file. This file format is internal to Godot; it is created by importing other image formats with the import system. :ref:`CompressedTexture2D<class_CompressedTexture2D>` can use one of 4 compresson methods:
  16. - Uncompressed (uncompressed on the GPU)
  17. - Lossless (WebP or PNG, uncompressed on the GPU)
  18. - Lossy (WebP, uncompressed on the GPU)
  19. - VRAM Compressed (compressed on the GPU)
  20. Only **VRAM Compressed** actually reduces the memory usage on the GPU. The **Lossless** and **Lossy** compression methods will reduce the required storage on disk, but they will not reduce memory usage on the GPU as the texture is sent to the GPU uncompressed.
  21. Using **VRAM Compressed** also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless or lossy compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D.
  22. .. rst-class:: classref-reftable-group
  23. Properties
  24. ----------
  25. .. table::
  26. :widths: auto
  27. +-----------------------------+---------------------------------------------------------------------+--------+
  28. | :ref:`String<class_String>` | :ref:`load_path<class_CompressedTextureLayered_property_load_path>` | ``""`` |
  29. +-----------------------------+---------------------------------------------------------------------+--------+
  30. .. rst-class:: classref-reftable-group
  31. Methods
  32. -------
  33. .. table::
  34. :widths: auto
  35. +---------------------------------------+------------------------------------------------------------------------------------------------------+
  36. | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load<class_CompressedTextureLayered_method_load>` **(** :ref:`String<class_String>` path **)** |
  37. +---------------------------------------+------------------------------------------------------------------------------------------------------+
  38. .. rst-class:: classref-section-separator
  39. ----
  40. .. rst-class:: classref-descriptions-group
  41. Property Descriptions
  42. ---------------------
  43. .. _class_CompressedTextureLayered_property_load_path:
  44. .. rst-class:: classref-property
  45. :ref:`String<class_String>` **load_path** = ``""``
  46. .. rst-class:: classref-property-setget
  47. - :ref:`Error<enum_@GlobalScope_Error>` **load** **(** :ref:`String<class_String>` path **)**
  48. - :ref:`String<class_String>` **get_load_path** **(** **)**
  49. The path the texture should be loaded from.
  50. .. rst-class:: classref-section-separator
  51. ----
  52. .. rst-class:: classref-descriptions-group
  53. Method Descriptions
  54. -------------------
  55. .. _class_CompressedTextureLayered_method_load:
  56. .. rst-class:: classref-method
  57. :ref:`Error<enum_@GlobalScope_Error>` **load** **(** :ref:`String<class_String>` path **)**
  58. Loads the texture at ``path``.
  59. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  60. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  61. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  62. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  63. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  64. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`