diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-05-12 10:10:34 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2020-05-12 10:10:50 +0200 |
commit | d3bd219362cc66a3fe22ebd444f7f55305373414 (patch) | |
tree | b387643e0edd270d37f038b4cb523104bd757354 /doc | |
parent | 845ac76b23a0ad9c8a274e11a6ba6e51aca63746 (diff) |
doc: Sync classref with current source
Adds API changes from the new GPU lightmapper.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/classes/BakedLightmap.xml | 81 | ||||
-rw-r--r-- | doc/classes/BakedLightmapData.xml | 65 | ||||
-rw-r--r-- | doc/classes/Cubemap.xml | 2 | ||||
-rw-r--r-- | doc/classes/CubemapArray.xml | 2 | ||||
-rw-r--r-- | doc/classes/GIProbe.xml | 2 | ||||
-rw-r--r-- | doc/classes/GeometryInstance3D.xml | 48 | ||||
-rw-r--r-- | doc/classes/LightmapProbe.xml | 13 | ||||
-rw-r--r-- | doc/classes/LightmapperRD.xml | 13 | ||||
-rw-r--r-- | doc/classes/Mesh.xml | 2 | ||||
-rw-r--r-- | doc/classes/ProjectSettings.xml | 24 | ||||
-rw-r--r-- | doc/classes/RenderingServer.xml | 128 | ||||
-rw-r--r-- | doc/classes/ResourceFormatLoader.xml | 2 | ||||
-rw-r--r-- | doc/classes/StreamCubemap.xml | 13 | ||||
-rw-r--r-- | doc/classes/StreamCubemapArray.xml | 13 | ||||
-rw-r--r-- | doc/classes/StreamTexture2D.xml (renamed from doc/classes/StreamTexture.xml) | 2 | ||||
-rw-r--r-- | doc/classes/StreamTexture2DArray.xml | 13 | ||||
-rw-r--r-- | doc/classes/StreamTextureLayered.xml | 25 | ||||
-rw-r--r-- | doc/classes/Texture2DArray.xml | 2 | ||||
-rw-r--r-- | doc/classes/TextureLayered.xml | 28 |
19 files changed, 300 insertions, 178 deletions
diff --git a/doc/classes/BakedLightmap.xml b/doc/classes/BakedLightmap.xml new file mode 100644 index 0000000000..6fd08fc4e4 --- /dev/null +++ b/doc/classes/BakedLightmap.xml @@ -0,0 +1,81 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="BakedLightmap" inherits="VisualInstance3D" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="bias" type="float" setter="set_bias" getter="get_bias" default="0.0005"> + </member> + <member name="bounces" type="int" setter="set_bounces" getter="get_bounces" default="1"> + </member> + <member name="directional" type="bool" setter="set_directional" getter="is_directional" default="false"> + </member> + <member name="environment_custom_color" type="Color" setter="set_environment_custom_color" getter="get_environment_custom_color"> + </member> + <member name="environment_custom_energy" type="float" setter="set_environment_custom_energy" getter="get_environment_custom_energy"> + </member> + <member name="environment_custom_sky" type="Sky" setter="set_environment_custom_sky" getter="get_environment_custom_sky"> + </member> + <member name="environment_mode" type="int" setter="set_environment_mode" getter="get_environment_mode" enum="BakedLightmap.EnvironmentMode" default="0"> + </member> + <member name="generate_probes_subdiv" type="int" setter="set_generate_probes" getter="get_generate_probes" enum="BakedLightmap.GenerateProbes" default="0"> + </member> + <member name="interior" type="bool" setter="set_interior" getter="is_interior" default="false"> + </member> + <member name="light_data" type="BakedLightmapData" setter="set_light_data" getter="get_light_data"> + </member> + <member name="max_texture_size" type="int" setter="set_max_texture_size" getter="get_max_texture_size" default="16384"> + </member> + <member name="quality" type="int" setter="set_bake_quality" getter="get_bake_quality" enum="BakedLightmap.BakeQuality" default="1"> + </member> + <member name="use_denoiser" type="bool" setter="set_use_denoiser" getter="is_using_denoiser" default="true"> + </member> + </members> + <constants> + <constant name="BAKE_QUALITY_LOW" value="0" enum="BakeQuality"> + </constant> + <constant name="BAKE_QUALITY_MEDIUM" value="1" enum="BakeQuality"> + </constant> + <constant name="BAKE_QUALITY_HIGH" value="2" enum="BakeQuality"> + </constant> + <constant name="BAKE_QUALITY_ULTRA" value="3" enum="BakeQuality"> + </constant> + <constant name="GENERATE_PROBES_DISABLED" value="0" enum="GenerateProbes"> + </constant> + <constant name="GENERATE_PROBES_SUBDIV_4" value="1" enum="GenerateProbes"> + </constant> + <constant name="GENERATE_PROBES_SUBDIV_8" value="2" enum="GenerateProbes"> + </constant> + <constant name="GENERATE_PROBES_SUBDIV_16" value="3" enum="GenerateProbes"> + </constant> + <constant name="GENERATE_PROBES_SUBDIV_32" value="4" enum="GenerateProbes"> + </constant> + <constant name="BAKE_ERROR_OK" value="0" enum="BakeError"> + </constant> + <constant name="BAKE_ERROR_NO_LIGHTMAPPER" value="1" enum="BakeError"> + </constant> + <constant name="BAKE_ERROR_NO_SAVE_PATH" value="2" enum="BakeError"> + </constant> + <constant name="BAKE_ERROR_NO_MESHES" value="3" enum="BakeError"> + </constant> + <constant name="BAKE_ERROR_MESHES_INVALID" value="4" enum="BakeError"> + </constant> + <constant name="BAKE_ERROR_CANT_CREATE_IMAGE" value="5" enum="BakeError"> + </constant> + <constant name="BAKE_ERROR_USER_ABORTED" value="6" enum="BakeError"> + </constant> + <constant name="ENVIRONMENT_MODE_DISABLED" value="0" enum="EnvironmentMode"> + </constant> + <constant name="ENVIRONMENT_MODE_SCENE" value="1" enum="EnvironmentMode"> + </constant> + <constant name="ENVIRONMENT_MODE_CUSTOM_SKY" value="2" enum="EnvironmentMode"> + </constant> + <constant name="ENVIRONMENT_MODE_CUSTOM_COLOR" value="3" enum="EnvironmentMode"> + </constant> + </constants> +</class> diff --git a/doc/classes/BakedLightmapData.xml b/doc/classes/BakedLightmapData.xml new file mode 100644 index 0000000000..026477782a --- /dev/null +++ b/doc/classes/BakedLightmapData.xml @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="BakedLightmapData" inherits="Resource" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + <method name="add_user"> + <return type="void"> + </return> + <argument index="0" name="path" type="NodePath"> + </argument> + <argument index="1" name="lightmap" type="Rect2"> + </argument> + <argument index="2" name="offset" type="int"> + </argument> + <argument index="3" name="arg3" type="int"> + </argument> + <description> + </description> + </method> + <method name="clear_users"> + <return type="void"> + </return> + <description> + </description> + </method> + <method name="get_user_count" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="get_user_path" qualifiers="const"> + <return type="NodePath"> + </return> + <argument index="0" name="user_idx" type="int"> + </argument> + <description> + </description> + </method> + <method name="is_using_spherical_harmonics" qualifiers="const"> + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="set_uses_spherical_harmonics"> + <return type="void"> + </return> + <argument index="0" name="uses_spherical_harmonics" type="bool"> + </argument> + <description> + </description> + </method> + </methods> + <members> + <member name="light_texture" type="TextureLayered" setter="set_light_texture" getter="get_light_texture"> + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/Cubemap.xml b/doc/classes/Cubemap.xml index 16431c65c9..61cb1d43f0 100644 --- a/doc/classes/Cubemap.xml +++ b/doc/classes/Cubemap.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Cubemap" inherits="TextureLayered" version="4.0"> +<class name="Cubemap" inherits="ImageTextureLayered" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/CubemapArray.xml b/doc/classes/CubemapArray.xml index 03cfd75acf..627baf79e0 100644 --- a/doc/classes/CubemapArray.xml +++ b/doc/classes/CubemapArray.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="CubemapArray" inherits="TextureLayered" version="4.0"> +<class name="CubemapArray" inherits="ImageTextureLayered" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/GIProbe.xml b/doc/classes/GIProbe.xml index df50244c77..23dd562653 100644 --- a/doc/classes/GIProbe.xml +++ b/doc/classes/GIProbe.xml @@ -19,7 +19,7 @@ <argument index="1" name="create_visual_debug" type="bool" default="false"> </argument> <description> - Bakes the effect from all [GeometryInstance3D]s marked with [member GeometryInstance3D.use_in_baked_light] and [Light3D]s marked with either [constant Light3D.BAKE_INDIRECT] or [constant Light3D.BAKE_ALL]. If [code]create_visual_debug[/code] is [code]true[/code], after baking the light, this will generate a [MultiMesh] that has a cube representing each solid cell with each cube colored to the cell's albedo color. This can be used to visualize the [GIProbe]'s data and debug any issues that may be occurring. + Bakes the effect from all [GeometryInstance3D]s marked with [constant GeometryInstance3D.GI_MODE_BAKED] and [Light3D]s marked with either [constant Light3D.BAKE_INDIRECT] or [constant Light3D.BAKE_ALL]. If [code]create_visual_debug[/code] is [code]true[/code], after baking the light, this will generate a [MultiMesh] that has a cube representing each solid cell with each cube colored to the cell's albedo color. This can be used to visualize the [GIProbe]'s data and debug any issues that may be occurring. </description> </method> <method name="debug_bake"> diff --git a/doc/classes/GeometryInstance3D.xml b/doc/classes/GeometryInstance3D.xml index 518a172973..cc85ce295b 100644 --- a/doc/classes/GeometryInstance3D.xml +++ b/doc/classes/GeometryInstance3D.xml @@ -9,15 +9,6 @@ <tutorials> </tutorials> <methods> - <method name="get_flag" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="flag" type="int" enum="GeometryInstance3D.Flags"> - </argument> - <description> - Returns the [enum GeometryInstance3D.Flags] that have been set for this object. - </description> - </method> <method name="get_shader_instance_uniform" qualifiers="const"> <return type="Variant"> </return> @@ -35,17 +26,6 @@ Overrides the bounding box of this node with a custom one. To remove it, set an [AABB] with all fields set to zero. </description> </method> - <method name="set_flag"> - <return type="void"> - </return> - <argument index="0" name="flag" type="int" enum="GeometryInstance3D.Flags"> - </argument> - <argument index="1" name="value" type="bool"> - </argument> - <description> - Sets the [enum GeometryInstance3D.Flags] specified. See [enum GeometryInstance3D.Flags] for options. - </description> - </method> <method name="set_shader_instance_uniform"> <return type="void"> </return> @@ -64,6 +44,10 @@ <member name="extra_cull_margin" type="float" setter="set_extra_cull_margin" getter="get_extra_cull_margin" default="0.0"> The extra distance added to the GeometryInstance3D's bounding box ([AABB]) to increase its cull box. </member> + <member name="gi_lightmap_scale" type="int" setter="set_lightmap_scale" getter="get_lightmap_scale" enum="GeometryInstance3D.LightmapScale" default="0"> + </member> + <member name="gi_mode" type="int" setter="set_gi_mode" getter="get_gi_mode" enum="GeometryInstance3D.GIMode" default="0"> + </member> <member name="lod_max_distance" type="float" setter="set_lod_max_distance" getter="get_lod_max_distance" default="0.0"> The GeometryInstance3D's max LOD distance. [b]Note:[/b] This property currently has no effect. @@ -84,11 +68,6 @@ The material override for the whole geometry. If a material is assigned to this property, it will be used instead of any material set in any material slot of the mesh. </member> - <member name="use_dynamic_gi" type="bool" setter="set_flag" getter="get_flag" default="false"> - </member> - <member name="use_in_baked_light" type="bool" setter="set_flag" getter="get_flag" default="false"> - If [code]true[/code], this GeometryInstance3D will be used when baking lights using a [GIProbe]. - </member> </members> <constants> <constant name="SHADOW_CASTING_SETTING_OFF" value="0" enum="ShadowCastingSetting"> @@ -106,16 +85,21 @@ Will only show the shadows casted from this object. In other words, the actual mesh will not be visible, only the shadows casted from the mesh will be. </constant> - <constant name="FLAG_USE_BAKED_LIGHT" value="0" enum="Flags"> - Will allow the GeometryInstance3D to be used when baking lights using a [GIProbe]. + <constant name="GI_MODE_DISABLED" value="0" enum="GIMode"> + </constant> + <constant name="GI_MODE_BAKED" value="1" enum="GIMode"> + </constant> + <constant name="GI_MODE_DYNAMIC" value="2" enum="GIMode"> + </constant> + <constant name="LIGHTMAP_SCALE_1X" value="0" enum="LightmapScale"> + </constant> + <constant name="LIGHTMAP_SCALE_2X" value="1" enum="LightmapScale"> </constant> - <constant name="FLAG_USE_DYNAMIC_GI" value="1" enum="Flags"> + <constant name="LIGHTMAP_SCALE_4X" value="2" enum="LightmapScale"> </constant> - <constant name="FLAG_DRAW_NEXT_FRAME_IF_VISIBLE" value="2" enum="Flags"> - Unused in this class, exposed for consistency with [enum RenderingServer.InstanceFlags]. + <constant name="LIGHTMAP_SCALE_8X" value="3" enum="LightmapScale"> </constant> - <constant name="FLAG_MAX" value="3" enum="Flags"> - Represents the size of the [enum Flags] enum. + <constant name="LIGHTMAP_SCALE_MAX" value="4" enum="LightmapScale"> </constant> </constants> </class> diff --git a/doc/classes/LightmapProbe.xml b/doc/classes/LightmapProbe.xml new file mode 100644 index 0000000000..3af71f3774 --- /dev/null +++ b/doc/classes/LightmapProbe.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="LightmapProbe" inherits="Node3D" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/LightmapperRD.xml b/doc/classes/LightmapperRD.xml new file mode 100644 index 0000000000..0993b28f19 --- /dev/null +++ b/doc/classes/LightmapperRD.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="LightmapperRD" inherits="Lightmapper" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/Mesh.xml b/doc/classes/Mesh.xml index 6958c815a6..367099e455 100644 --- a/doc/classes/Mesh.xml +++ b/doc/classes/Mesh.xml @@ -102,7 +102,7 @@ </method> </methods> <members> - <member name="lightmap_size_hint" type="Vector2" setter="set_lightmap_size_hint" getter="get_lightmap_size_hint" default="Vector2( 0, 0 )"> + <member name="lightmap_size_hint" type="Vector2i" setter="set_lightmap_size_hint" getter="get_lightmap_size_hint" default="Vector2i( 0, 0 )"> Sets a hint to be used for lightmap resolution. </member> </members> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index dc07dd8837..0262e86296 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -977,8 +977,32 @@ <member name="rendering/environment/default_environment" type="String" setter="" getter="" default=""""> [Environment] that will be used as a fallback environment in case a scene does not specify its own environment. The default environment is loaded in at scene load time regardless of whether you have set an environment or not. If you do not rely on the fallback environment, it is best to delete [code]default_env.tres[/code], or to specify a different default environment here. </member> + <member name="rendering/gpu_lightmapper/performance/max_rays_per_pass" type="int" setter="" getter="" default="32"> + </member> + <member name="rendering/gpu_lightmapper/performance/max_rays_per_probe_pass" type="int" setter="" getter="" default="64"> + </member> + <member name="rendering/gpu_lightmapper/performance/region_size" type="int" setter="" getter="" default="512"> + </member> + <member name="rendering/gpu_lightmapper/quality/high_quality_probe_ray_count" type="int" setter="" getter="" default="512"> + </member> + <member name="rendering/gpu_lightmapper/quality/high_quality_ray_count" type="int" setter="" getter="" default="256"> + </member> + <member name="rendering/gpu_lightmapper/quality/low_quality_probe_ray_count" type="int" setter="" getter="" default="64"> + </member> + <member name="rendering/gpu_lightmapper/quality/low_quality_ray_count" type="int" setter="" getter="" default="16"> + </member> + <member name="rendering/gpu_lightmapper/quality/medium_quality_probe_ray_count" type="int" setter="" getter="" default="256"> + </member> + <member name="rendering/gpu_lightmapper/quality/medium_quality_ray_count" type="int" setter="" getter="" default="64"> + </member> + <member name="rendering/gpu_lightmapper/quality/ultra_quality_probe_ray_count" type="int" setter="" getter="" default="2048"> + </member> + <member name="rendering/gpu_lightmapper/quality/ultra_quality_ray_count" type="int" setter="" getter="" default="1024"> + </member> <member name="rendering/high_end/global_shader_variables_buffer_size" type="int" setter="" getter="" default="65536"> </member> + <member name="rendering/lightmapper/probe_capture_update_speed" type="float" setter="" getter="" default="15"> + </member> <member name="rendering/limits/rendering/max_renderable_elements" type="int" setter="" getter="" default="128000"> Max amount of elements renderable in a frame. If more than this are visible per frame, they will be dropped. Keep in mind elements refer to mesh surfaces and not meshes themselves. </member> diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml index 648f4d0107..d8be6d4bd7 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -1282,7 +1282,7 @@ <argument index="1" name="base" type="RID"> </argument> <description> - Sets the base of the instance. A base can be any of the 3D objects that are created in the RenderingServer that can be displayed. For example, any of the light types, mesh, multimesh, immediate geometry, particle system, reflection probe, lightmap capture, and the GI probe are all types that can be set as the base of an instance in order to be displayed in the scenario. + Sets the base of the instance. A base can be any of the 3D objects that are created in the RenderingServer that can be displayed. For example, any of the light types, mesh, multimesh, immediate geometry, particle system, reflection probe, lightmap, and the GI probe are all types that can be set as the base of an instance in order to be displayed in the scenario. </description> </method> <method name="instance_set_blend_shape_weight"> @@ -1377,19 +1377,6 @@ Sets the world space transform of the instance. Equivalent to [member Node3D.transform]. </description> </method> - <method name="instance_set_use_lightmap"> - <return type="void"> - </return> - <argument index="0" name="instance" type="RID"> - </argument> - <argument index="1" name="lightmap_instance" type="RID"> - </argument> - <argument index="2" name="lightmap" type="RID"> - </argument> - <description> - Sets the lightmap to use with this instance. - </description> - </method> <method name="instance_set_visible"> <return type="void"> </return> @@ -1584,115 +1571,6 @@ Sets whether GI probes capture light information from this light. </description> </method> - <method name="lightmap_capture_create"> - <return type="RID"> - </return> - <description> - Creates a lightmap capture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]lightmap_capture_*[/code] RenderingServer functions. - Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. - To place in a scene, attach this lightmap capture to an instance using [method instance_set_base] using the returned RID. - </description> - </method> - <method name="lightmap_capture_get_bounds" qualifiers="const"> - <return type="AABB"> - </return> - <argument index="0" name="capture" type="RID"> - </argument> - <description> - Returns the size of the lightmap capture area. - </description> - </method> - <method name="lightmap_capture_get_energy" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="capture" type="RID"> - </argument> - <description> - Returns the energy multiplier used by the lightmap capture. - </description> - </method> - <method name="lightmap_capture_get_octree" qualifiers="const"> - <return type="PackedByteArray"> - </return> - <argument index="0" name="capture" type="RID"> - </argument> - <description> - Returns the octree used by the lightmap capture. - </description> - </method> - <method name="lightmap_capture_get_octree_cell_subdiv" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="capture" type="RID"> - </argument> - <description> - Returns the cell subdivision amount used by this lightmap capture's octree. - </description> - </method> - <method name="lightmap_capture_get_octree_cell_transform" qualifiers="const"> - <return type="Transform"> - </return> - <argument index="0" name="capture" type="RID"> - </argument> - <description> - Returns the cell transform for this lightmap capture's octree. - </description> - </method> - <method name="lightmap_capture_set_bounds"> - <return type="void"> - </return> - <argument index="0" name="capture" type="RID"> - </argument> - <argument index="1" name="bounds" type="AABB"> - </argument> - <description> - Sets the size of the area covered by the lightmap capture. - </description> - </method> - <method name="lightmap_capture_set_energy"> - <return type="void"> - </return> - <argument index="0" name="capture" type="RID"> - </argument> - <argument index="1" name="energy" type="float"> - </argument> - <description> - Sets the energy multiplier for this lightmap capture. - </description> - </method> - <method name="lightmap_capture_set_octree"> - <return type="void"> - </return> - <argument index="0" name="capture" type="RID"> - </argument> - <argument index="1" name="octree" type="PackedByteArray"> - </argument> - <description> - Sets the octree to be used by this lightmap capture. - </description> - </method> - <method name="lightmap_capture_set_octree_cell_subdiv"> - <return type="void"> - </return> - <argument index="0" name="capture" type="RID"> - </argument> - <argument index="1" name="subdiv" type="int"> - </argument> - <description> - Sets the subdivision level of this lightmap capture's octree. - </description> - </method> - <method name="lightmap_capture_set_octree_cell_transform"> - <return type="void"> - </return> - <argument index="0" name="capture" type="RID"> - </argument> - <argument index="1" name="xform" type="Transform"> - </argument> - <description> - Sets the octree cell transform for this lightmap capture's octree. - </description> - </method> <method name="make_sphere_mesh"> <return type="RID"> </return> @@ -3725,8 +3603,8 @@ <constant name="INSTANCE_GI_PROBE" value="8" enum="InstanceType"> The instance is a GI probe. </constant> - <constant name="INSTANCE_LIGHTMAP_CAPTURE" value="9" enum="InstanceType"> - The instance is a lightmap capture. + <constant name="INSTANCE_LIGHTMAP" value="9" enum="InstanceType"> + The instance is a lightmap. </constant> <constant name="INSTANCE_MAX" value="10" enum="InstanceType"> Represents the size of the [enum InstanceType] enum. diff --git a/doc/classes/ResourceFormatLoader.xml b/doc/classes/ResourceFormatLoader.xml index 713f2c1726..ad0c438f98 100644 --- a/doc/classes/ResourceFormatLoader.xml +++ b/doc/classes/ResourceFormatLoader.xml @@ -6,7 +6,7 @@ <description> Godot loads resources in the editor or in exported games using ResourceFormatLoaders. They are queried automatically via the [ResourceLoader] singleton, or when a resource with internal dependencies is loaded. Each file type may load as a different resource type, so multiple ResourceFormatLoaders are registered in the engine. Extending this class allows you to define your own loader. Be sure to respect the documented return types and values. You should give it a global class name with [code]class_name[/code] for it to be registered. Like built-in ResourceFormatLoaders, it will be called automatically when loading resources of its handled type(s). You may also implement a [ResourceFormatSaver]. - [b]Note:[/b] You can also extend [EditorImportPlugin] if the resource type you need exists but Godot is unable to load its format. Choosing one way over another depends if the format is suitable or not for the final exported game. For example, it's better to import [code].png[/code] textures as [code].stex[/code] ([StreamTexture]) first, so they can be loaded with better efficiency on the graphics card. + [b]Note:[/b] You can also extend [EditorImportPlugin] if the resource type you need exists but Godot is unable to load its format. Choosing one way over another depends if the format is suitable or not for the final exported game. For example, it's better to import [code].png[/code] textures as [code].stex[/code] ([StreamTexture2D]) first, so they can be loaded with better efficiency on the graphics card. </description> <tutorials> </tutorials> diff --git a/doc/classes/StreamCubemap.xml b/doc/classes/StreamCubemap.xml new file mode 100644 index 0000000000..16648266eb --- /dev/null +++ b/doc/classes/StreamCubemap.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="StreamCubemap" inherits="StreamTextureLayered" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/StreamCubemapArray.xml b/doc/classes/StreamCubemapArray.xml new file mode 100644 index 0000000000..b84973fd14 --- /dev/null +++ b/doc/classes/StreamCubemapArray.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="StreamCubemapArray" inherits="StreamTextureLayered" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/StreamTexture.xml b/doc/classes/StreamTexture2D.xml index 03afcb5b0d..214298475c 100644 --- a/doc/classes/StreamTexture.xml +++ b/doc/classes/StreamTexture2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="StreamTexture" inherits="Texture2D" version="4.0"> +<class name="StreamTexture2D" inherits="Texture2D" version="4.0"> <brief_description> A [code].stex[/code] texture. </brief_description> diff --git a/doc/classes/StreamTexture2DArray.xml b/doc/classes/StreamTexture2DArray.xml new file mode 100644 index 0000000000..ec545b24d0 --- /dev/null +++ b/doc/classes/StreamTexture2DArray.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="StreamTexture2DArray" inherits="StreamTextureLayered" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/StreamTextureLayered.xml b/doc/classes/StreamTextureLayered.xml new file mode 100644 index 0000000000..10a7aae976 --- /dev/null +++ b/doc/classes/StreamTextureLayered.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="StreamTextureLayered" inherits="TextureLayered" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + <method name="load"> + <return type="int" enum="Error"> + </return> + <argument index="0" name="path" type="String"> + </argument> + <description> + </description> + </method> + </methods> + <members> + <member name="load_path" type="String" setter="load" getter="get_load_path" default=""""> + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/Texture2DArray.xml b/doc/classes/Texture2DArray.xml index 657506120e..bb9283803d 100644 --- a/doc/classes/Texture2DArray.xml +++ b/doc/classes/Texture2DArray.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Texture2DArray" inherits="TextureLayered" version="4.0"> +<class name="Texture2DArray" inherits="ImageTextureLayered" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/TextureLayered.xml b/doc/classes/TextureLayered.xml index 66e5b69ab4..d81c3c7c5a 100644 --- a/doc/classes/TextureLayered.xml +++ b/doc/classes/TextureLayered.xml @@ -9,14 +9,6 @@ <tutorials> </tutorials> <methods> - <method name="create_from_images"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="images" type="Array"> - </argument> - <description> - </description> - </method> <method name="get_format" qualifiers="const"> <return type="int" enum="Image.Format"> </return> @@ -40,6 +32,12 @@ Returns an [Image] resource with the data from specified [code]layer[/code]. </description> </method> + <method name="get_layered_type" qualifiers="const"> + <return type="int" enum="TextureLayered.LayeredType"> + </return> + <description> + </description> + </method> <method name="get_layers" qualifiers="const"> <return type="int"> </return> @@ -53,17 +51,19 @@ Returns the width of the texture. Width is typically represented by the X-axis. </description> </method> - <method name="update_layer"> - <return type="void"> + <method name="has_mipmaps" qualifiers="const"> + <return type="bool"> </return> - <argument index="0" name="image" type="Image"> - </argument> - <argument index="1" name="layer" type="int"> - </argument> <description> </description> </method> </methods> <constants> + <constant name="LAYERED_TYPE_2D_ARRAY" value="0" enum="LayeredType"> + </constant> + <constant name="LAYERED_TYPE_CUBEMAP" value="1" enum="LayeredType"> + </constant> + <constant name="LAYERED_TYPE_CUBEMAP_ARRAY" value="2" enum="LayeredType"> + </constant> </constants> </class> |